mawerty / Is-Prime

O(1) Algorithm to check if number is prime that works in 95%+ cases.
https://mawerty.github.io/Is-Prime/
Other
719 stars 145 forks source link

Does this even work? #256

Open rohanrkamath opened 7 months ago

rohanrkamath commented 7 months ago

I was just testing the app with some random prime numbers, and it literally does not work. I tried 2, 3, 5, and 7, and it detected it as a non prime number.

Screenshot 2024-03-19 at 10 51 54 PM Screenshot 2024-03-19 at 10 50 45 PM

Does this fall under the 5% potential error? Or is there an internal joke happening that I am not aware of?

RainVaporeon commented 7 months ago

I was just testing the app with some random prime numbers, and it literally does not work. I tried 2, 3, 5, and 7, and it detected it as a non prime number. Screenshot 2024-03-19 at 10 51 54 PM Screenshot 2024-03-19 at 10 50 45 PM

Does this fall under the 5% potential error? Or is there an internal joke happening that I am not aware of?

Well, yes! Sometimes you get unlucky and it would not report correctly, in that case you should try it a few more times!

rohanrkamath commented 2 months ago

Sorry for the late reply. It is working when I tried it now. Nice!