756
Stop using floats (lemmy.world)
you are viewing a single comment's thread
view the rest of the comments
[-] anton@lemmy.blahaj.zone 3 points 6 months ago

What's the problem with -0?
It conceptually makes sense for to negativ values to close to 0 to be represented as -0.
In practice I have never seen a problem with -0.

On NaN: While its use cases can nowadays be replaced with language constructs like result types, it was created before exceptions or sum types. The way it propagates kind of mirrors Haskells monadic Maybe.
We should be demanding more and better wrapper types from our language/standard library designers.

this post was submitted on 26 Feb 2024
756 points (95.8% liked)

Programmer Humor

19208 readers
1347 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS