Ancestors

Toot

Written by Joel Michael on 2025-01-19 at 23:35

TIL Mastodon uses IEEE754 or something when counting poll results

=> View attached media

=> More informations about this toot | More toots from jpm@aus.social

Descendants

Written by Joel Michael on 2025-01-19 at 23:54

Hey @shlee do the Aus.social servers have that Pentium division bug?

=> More informations about this toot | More toots from jpm@aus.social

Written by Drew Mayo on 2025-01-19 at 23:43

@jpm

User: numbers don’t sum to 100%

Dev: it’s correct rounding (close)

User: but they need to sum to 100%

Dev: working to spec (close)

User: just tweak a number to make it 100%

Dev: but that’s just as wrong, in a different way (close)

User: but it needs to sum to 100%

Senior: oh dear god is this still open? Just make the last one 100-sum. It’s dumb but all options are bad here.

=> More informations about this toot | More toots from drew@eigenmagic.net

Written by Mark. Just Mark. on 2025-01-20 at 00:13

@jpm @shlee cool that whatever math library it uses has rounded 12.5 up to 13 but (presumably) 49.999 down to 49.

Is there an IEEE floating point "round to odd integer" mode?

(Also, I wonder what calculation was going on such that 4 out of 8 was not represented as exactly 0.5, which can be exactly represented by a binary floating point number, unlike 0.1)

=> More informations about this toot | More toots from markjustmark@aus.social

Written by :PUA: Shlee fucked around and on 2025-01-20 at 01:03

@jpm I think that’s the client… but maybe 😅

=> More informations about this toot | More toots from shlee@aus.social

Written by Joel Michael on 2025-01-20 at 03:07

@shlee can you comment @ivory ? Every possible way to add up these poll numbers is wrong…

=> More informations about this toot | More toots from jpm@aus.social

Written by Ivory by Tapbots :emoji_wink: on 2025-01-20 at 15:06

@jpm There will always potentially be slight rounding errors depending on certain scenarios because we want to keep the UI simple with whole numbers.

=> More informations about this toot | More toots from ivory@tapbots.social

Written by Colin on 2025-01-20 at 01:33

@jpm @shlee I'm sure there's a library you can import to add it if it doesn't.

=> More informations about this toot | More toots from abstractcode@eigenmagic.net

Written by Grant Trebbin on 2025-01-20 at 01:31

@jpm I'm curious what the percentages would be if there were equal votes for three options.

=> More informations about this toot | More toots from gptreb@aus.social

Written by :PUA: Shlee fucked around and on 2025-01-20 at 03:13

@jpm 99%

=> View attached media

=> More informations about this toot | More toots from shlee@aus.social

Written by Stuart Longland (VK4MSL) on 2025-01-20 at 03:19

@shlee @jpm I'm seeing similar on a different server.

Not sure how it's represented in the Mastodon server itself (which is Ruby), but maybe it's front-end JavaScript?

JavaScript has no Integer data type, only Number (which is 64-bit IEEE-754) and BigInt (a uin64_t basically).

=> View attached media

=> More informations about this toot | More toots from stuartl@longlandclan.id.au

Written by Joel Michael on 2025-01-20 at 04:03

@shlee hahahahahahaha even better!

=> More informations about this toot | More toots from jpm@aus.social

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113857643077591151
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
316.40781 milliseconds
Gemini-to-HTML Time
2.895868 milliseconds

This content has been proxied by September (3851b).