diff --git a/tests/Unit/Math/PrimeFieldTest.php b/tests/Unit/Math/PrimeFieldTest.php new file mode 100644 index 00000000..24ecfabd --- /dev/null +++ b/tests/Unit/Math/PrimeFieldTest.php @@ -0,0 +1,23 @@ +expectException('UnexpectedValueException'); + + $a = new BigInteger('65', 10); + $p = new BigInteger('126', 10); // 126 isn't a prime + + $num = new PrimeField($p); + $num2 = $num->newInteger($a); + + echo $num2->squareRoot(); + } +}