not digg
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Arthur Besse@lemmy.ml to Programmer Humor@lemmy.mlEnglish ·
edit-2
11 hours ago

Incredible stochastic algorithm, gets more reliable the larger your input, incredibly fast, trivial to implement and deterministic on its inputs

lemmy.ml

message-square
24
fedilink
213

Incredible stochastic algorithm, gets more reliable the larger your input, incredibly fast, trivial to implement and deterministic on its inputs

lemmy.ml

Arthur Besse@lemmy.ml to Programmer Humor@lemmy.mlEnglish ·
edit-2
11 hours ago
message-square
24
fedilink

cross-posted from: https://lemmy.blahaj.zone/post/38950495

https://cosocial.ca/@mhoye/116111505546606451

alert-triangle
You must log in or register to comment.
  • Jankatarch@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    58 minutes ago

    …95.121%
    ???

  • HiddenLayer555@lemmy.ml
    link
    fedilink
    English
    arrow-up
    4
    ·
    2 hours ago

    Just put “Precondition: x must not be prime” in the function doc and it’ll be 100% accurate. Not my fault if you use it wrong.

  • Armand1@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    1 hour ago

    I said something similar here about an election fraud detection system with 99.999% accuracy.

    https://lemmy.world/comment/22178379

  • pruwyben@discuss.tchncs.de
    link
    fedilink
    arrow-up
    5
    ·
    7 hours ago

    Is this not at all stochastic, or do I just not know what stochastic means?

    • Arthur Besse@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      4 hours ago

      it would be clearer to say that it is stochastically accurate

  • rbos@lemmy.ca
    link
    fedilink
    English
    arrow-up
    7
    ·
    8 hours ago

    I’ve had managers who follow that exact algorithm.

  • Evotech@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    7 hours ago

    This but AI

    • Jankatarch@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      51 minutes ago

      “AI models have started training other AI models, by pressing The-Button-That-Trains-AI-models; this button was built 7 years ago by a bunch of online volunteers we won’t ever credit.”

  • /home/pineapplelover@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    5
    arrow-down
    1
    ·
    9 hours ago

    I’m confused, shouldn’t this be printing false no matter what the input is?

    • Couldbealeotard@lemmy.world
      link
      fedilink
      English
      arrow-up
      4
      ·
      2 hours ago

      The output is not the output of the algorithm, it’s the output of the unit test.

      95% of numbers up to that point at not prime. Testing the algorithm that only says “not prime” is therefore correct 95% of the time. The joke is that, similar to AI, the algorithm is being presented as a useful tool because it’s correct often but not always.

    • anton@lemmy.blahaj.zone
      link
      fedilink
      arrow-up
      3
      ·
      7 hours ago

      The test suite probably looks something like this:

      int tests_passed=0;
      int tests_failed=0;
      for(int i=0;i<100000;i++){
          printf("test no. %d: ", i);
          if(is_prime(i)==actually_is_prime(i)){
              printf("passed\n");
              tests_passed++;
          }else{
              printf("failed\n");
              tests_failed++;
          }
      }
      //...
      
    • Carl [he/him]@hexbear.net
      link
      fedilink
      English
      arrow-up
      6
      ·
      edit-2
      8 hours ago

      that’s the joke, since most numbers aren’t prime, this function is technically highly accurate despite being completely useless.

    • fallaciousBasis@lemmy.world
      link
      fedilink
      arrow-up
      3
      arrow-down
      1
      ·
      8 hours ago

      Removed by mod

      • Ænima@lemmy.zip
        link
        fedilink
        arrow-up
        2
        ·
        8 hours ago

        Removed by mod

  • MeetMeAtTheMovies [they/them]@hexbear.net
    link
    fedilink
    English
    arrow-up
    4
    ·
    8 hours ago

    Warning: unused variable

    Just add it to the pile I guess

  • Thekingoflorda@lemmy.world
    link
    fedilink
    arrow-up
    11
    ·
    11 hours ago

    It approaches 100% accuracy

  • TomMasz@lemmy.world
    link
    fedilink
    English
    arrow-up
    26
    arrow-down
    1
    ·
    13 hours ago

    95.121% of the time it works everytime.

  • anton@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    1
    ·
    7 hours ago

    deleted by creator

  • idriss@lemmy.ml
    link
    fedilink
    arrow-up
    23
    arrow-down
    1
    ·
    13 hours ago

    I am screenshoting this so it will be screenshot of a screenshot of a screenshot then post it somewhere else

    • athatet@lemmy.zip
      link
      fedilink
      arrow-up
      1
      ·
      7 hours ago

      ifunny

    • SharkAttak@kbin.melroy.org
      link
      fedilink
      arrow-up
      5
      arrow-down
      1
      ·
      10 hours ago

      Not even adding some watermark? smh

  • sepiroth154@feddit.nl
    link
    fedilink
    arrow-up
    13
    ·
    edit-2
    12 hours ago

    You could simplify it even further by removing the int x parameter of the function…

    • obelisk_complex@piefed.ca
      link
      fedilink
      English
      arrow-up
      9
      arrow-down
      1
      ·
      11 hours ago

      So elegant! This is too valuable for GitHub, sell this directly to the Saudi government.

  • razen@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    10 hours ago

    But when the input is all prime numbers then the accuracy is 0.

    • Arthur Besse@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      6
      ·
      10 hours ago

      The Simpsons character Rainier Wolfcastle on stage with a microphone, on TV, with the caption "THAT'S THE JOKE"

      also btw icymi, this is a post about LLMs

    • fallaciousBasis@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      8 hours ago

      True

  • lnxtx (xe/xem/xyr)@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    3
    arrow-down
    1
    ·
    12 hours ago

    But cryptography…

Programmer Humor@lemmy.ml

programmerhumor@lemmy.ml

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmerhumor@lemmy.ml

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 308 users / day
  • 856 users / week
  • 1.53K users / month
  • 4.43K users / 6 months
  • 1 local subscriber
  • 41.1K subscribers
  • 1.96K Posts
  • 4.47K Comments
  • Modlog
  • mods:
  • cat_programmer@lemmy.ml
  • AgreeableLandscape@lemmy.ml
  • BE: 0.19.5
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org