dartist / dart-bignum

Other
14 stars 11 forks source link

BigIntegerDartVM.isProbablyPrime broken for negative numbers #44

Closed stevenroose closed 6 years ago

stevenroose commented 6 years ago

Look at this line: https://github.com/dartist/dart-bignum/blob/a74f0fcec4b7fc7eca072f0526f957aa77e91937/lib/src/big_integer_dartvm.dart#L730

For negative numbers, they will always be lower than the highest low prime and will always return false.