▲ 187 ▼ Fun fact: you can't upload this image on piefed.social (lemmy.dbzer0.com) submitted 9 months ago by irelephant@lemmy.dbzer0.com to c/fediverse@lemmy.world 150 comments fedilink hide all child comments
[–] magiccupcake@lemmy.world 21 points 9 months ago (2 children) If 0/0 < 0 would error? If 0 < 0 evaluates false That makes it even worse??? permalink fedilink source parent hideshow 2 child comments replies: [–] BB84@mander.xyz 5 points 9 months ago (1 child) Usually 0/0=NaN and NaN compared with a number would be false. Maybe the (up-down)/(up+down) is just what AmazingWizard summarized from the code. But from what we have seen of the quality of that codebase I won't be surprised if it's literally this expression, division by zero and all. Lol permalink fedilink source parent hideshow 1 child comment replies: [–] Edie@lemmy.ml 4 points 9 months ago* The (upvotes cast - downvotes cast) / (upvotes + downvotes) is what the code itself says Here's recalculate_attitude, line 1268 checks that they have at least made 10 votes. permalink fedilink source parent
[–] BB84@mander.xyz 5 points 9 months ago (1 child) Usually 0/0=NaN and NaN compared with a number would be false. Maybe the (up-down)/(up+down) is just what AmazingWizard summarized from the code. But from what we have seen of the quality of that codebase I won't be surprised if it's literally this expression, division by zero and all. Lol permalink fedilink source parent hideshow 1 child comment replies: [–] Edie@lemmy.ml 4 points 9 months ago* The (upvotes cast - downvotes cast) / (upvotes + downvotes) is what the code itself says Here's recalculate_attitude, line 1268 checks that they have at least made 10 votes. permalink fedilink source parent
[–] Edie@lemmy.ml 4 points 9 months ago* The (upvotes cast - downvotes cast) / (upvotes + downvotes) is what the code itself says Here's recalculate_attitude, line 1268 checks that they have at least made 10 votes. permalink fedilink source parent