Problem 49738. Determine whether a prime is Pythagorean
Solution Stats
Problem Comments
-
3 Comments
As far as I understand the assert function, the tests #13, 15, 17 and 18 actually appear to be wrong (!) since accordind to Matlab isprime function theirs inputs are not prime numbers (resp 99194853094755497, 1066340417491710595814572169, 19134702400093278081449423917, and 10888869450418352160768000001). Could you please double check these tests ? Thank you.
@Nicolas they're all primes, but they all exceed flintmax, and I think isprime() does not handle such numbers reliably (arguably something its documentation should mention).
Thank you Christian for explanation :-)
Solution Comments
Show commentsProblem Recent Solvers83
Suggested Problems
-
Project Euler: Problem 2, Sum of even Fibonacci
2779 Solvers
-
Matrix with different incremental runs
564 Solvers
-
Construct an index vector from two input vectors in vectorized fashion
441 Solvers
-
Height of a right-angled triangle
1975 Solvers
-
Is this is a Tic Tac Toe X Win?
524 Solvers
More from this Author315
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!