okr765
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Arthur Besse@lemmy.ml to Programmer Humor@lemmy.mlEnglish ·
edit-2
10 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
20
fedilink
243

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
10 hours ago
message-square
20
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.
  • HiddenLayer555@lemmy.ml
    link
    fedilink
    English
    arrow-up
    2
    ·
    24 minutes 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
    3 minutes 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
    ·
    6 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
      ·
      3 hours ago

      it would be clearer to say that it is stochastically accurate

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

    I’ve had managers who follow that exact algorithm.

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

    This but AI

  • /home/pineapplelover@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    6
    arrow-down
    1
    ·
    7 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
      1
      ·
      35 minutes 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
      ·
      5 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++;
          }
      }
      //...
      
    • fallaciousBasis@lemmy.world
      link
      fedilink
      arrow-up
      4
      arrow-down
      1
      ·
      7 hours ago

      Removed by mod

      • Ænima@lemmy.zip
        link
        fedilink
        arrow-up
        3
        ·
        7 hours ago

        Removed by mod

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

    It approaches 100% accuracy

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

    95.121% of the time it works everytime.

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

    deleted by creator

  • sepiroth154@feddit.nl
    link
    fedilink
    arrow-up
    15
    ·
    edit-2
    11 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
      11
      arrow-down
      1
      ·
      10 hours ago

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

  • idriss@lemmy.ml
    link
    fedilink
    arrow-up
    22
    arrow-down
    1
    ·
    12 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
      ·
      6 hours ago

      ifunny

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

      Not even adding some watermark? smh

  • razen@lemmy.world
    link
    fedilink
    arrow-up
    4
    ·
    9 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
      ·
      8 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
      ·
      7 hours ago

      True

  • lnxtx (xe/xem/xyr)@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    3
    arrow-down
    1
    ·
    11 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.

  • 352 users / day
  • 956 users / week
  • 1.71K users / month
  • 5.76K users / 6 months
  • 1 local subscriber
  • 41.1K subscribers
  • 1.46K Posts
  • 19.9K Comments
  • Modlog
  • mods:
  • AgreeableLandscape@lemmy.ml
  • cat_programmer@lemmy.ml
  • BE: 0.19.9
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org