

61·
2 months ago“performance”
“performance”
More 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
There’s a difference?