- 0 Posts
- 3 Comments
Joined 2 years ago
Cake day: July 23rd, 2023
You are not logged in. If you use a Fediverse account that is able to follow users, you can follow this user.
call_me_xale@lemmy.zipto Programmer Humor@programming.dev•First exposure to floating-point arithmetic1·2 months agoMore devs should learn to use Rational types. A pretty large majority of the numbers that people care about in real life can easily be represented by a ratio of integers, and they allow math with perfect precision.
eta: even monetary types are just a form of Rational, with the denominators clamped to powers of ten
“performance”