• she/her

Principal engineer at Mercury. I've authored the Dhall configuration language, the Haskell for all blog, and countless packages and keynote presentations.

I'm a midwife to the hidden beauty in everything.

💖 @wiredaemon


discord
Gabriella439
discord server
discord.gg/XS5ZDZ8nnp
location
bay area
private page
cohost.org/newmoon

kodicraft
@kodicraft

this might be a hot take and i quite frankly havent thought about this too much but floating point values being the "default" way to handle any sort of fractional component even in tools designed to be accessible to non-insane people is a terrible idea, floating point values are good because they're a single format for a huge range but if you know the order of magnitude that your use case will need or even can vaguely approximate it you will almost always get more reliable behavior with fixed-point values. if i primarily expect fractional values between 0 and 100 why would I waste so many of my precious bits to poorly approximate 40 billion



You must log in to comment.

in reply to @kodicraft's post:

rational numbers can cause problems for normal people but yeah I wish more programming languages just had built-in support for rational numbers and presented that as a preferred way to represent precise fractional values

real answer probably because it's not that many bits wasted due to the log-log size of the exponent, and because having generalized hardware to handle this numeric format reliably and consistently is a huge boon in general