• Boomer Humor Doomergod@lemmy.world
    link
    fedilink
    English
    arrow-up
    16
    arrow-down
    2
    ·
    9 天前

    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.

    • Kairos@lemmy.today
      link
      fedilink
      arrow-up
      4
      ·
      9 天前

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

    • JackbyDev@programming.dev
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      1
      ·
      edit-2
      8 天前

      Makes me wonder where the actual break even would be. Like how long does making one random number take versus sins lookups. Fuck it, do it in parallel. Fastest wins.