Menu

#2324 1 is not prime

None
wont-fix
nobody
None
1
2017-11-30
2017-11-30
Anonymous
No

This line of code checks whether the minute is prime when deciding whether to display an easter egg:

for (int i = 2; i < 63; i++) if (ct.minute() != i && ct.minute() % i  == 0) return;

However, this erroneously includes 1 as a prime number, when it is not prime.

Discussion

  • Jan  Sundermeyer

    Jan Sundermeyer - 2017-11-30

    who cares ?

     
  • Jan  Sundermeyer

    Jan Sundermeyer - 2017-11-30
    • status: open --> wont-fix
    • Group: -->
     
  • Benito van der Zander

    You could consider it a double easter egg.

    At first it seems to happen on prime minutes, but then you see - easter egg - it happens on 1 too

     

Log in to post a comment.

MongoDB Logo MongoDB