197
Fun fact: you can't upload this image on piefed.social
(thelemmy.club)
A community to talk about the Fediverse and all it's related services using ActivityPub (Mastodon, Lemmy, Mbin, etc).
If you wanted to get help with moderating your own community then head over to !moderators@lemmy.world!
Learn more at these websites: Join The Fediverse Wiki, Fediverse.info, Wikipedia Page, The Federation Info (Stats), FediDB (Stats), Sub Rehab (Reddit Migration)
not if both upvotes and downvotes are zero ❗️
If 0/0 < 0 would error?
If 0 < 0 evaluates false
That makes it even worse???
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
The
(upvotes cast - downvotes cast) / (upvotes + downvotes)is what the code itself saysHere's recalculate_attitude, line 1268 checks that they have at least made 10 votes.