you are viewing a single comment's thread
view the rest of the comments
[–] 14 points 6 months ago* (3 children)

If you scaled it based on the size of the integer you could get that up to 99.9% test accuracy. Like if it's less than 10 give it 50% odds of returning false, if it's under 50 give it 10% odds, otherwise return false.

  • source
  • hideshow 6 child comments
  • [–] 4 points 6 months ago (2 children)

    That would make it less accurate. It's much more likely to return true on not a prime than a prime

  • source
  • parent
  • hideshow 4 child comments
  • [–] 2 points 6 months ago (1 child)

    Correct. Not are why people are upvoting. If 10% of numbers are prime in a range, and you always guess false, you get 90% right. If you randomly guess true 10% of the time, you get ~80% right.

  • source
  • parent
  • hideshow 2 child comments