by asudghionbio · 8y ago · 0 comments
I've never seen rationals in a codebase. And that's a shame, because they do some things elegantly.
1 + 1/2 + 1/3 + ... + 1/24,
the denominator already can't fit in a 32-bit int.
You could think of fixed point as a type of rational. ;)
In computer graphics we sometimes use rational curves. It's not the same as rational numbers, but related.