3 ms·
> what do you really need floating point numbers for? For representing real (i.e., potentially irrational or transcendental) numbers. Irrational and transcende
by otabdeveloper 11y ago
> what do you really need floating point numbers for?
For representing real (i.e., potentially irrational or transcendental) numbers. Irrational and transcendental numbers are actually very common in nature.
But you're right that representing rational numbers with floating point is stupid.
Instead of inventing new one-size-fits-all coding schemes, people should focus instead on making the idea of a rational number type mainstream.
This wouldn't even be an issue worth discussing if popular programming languages and DBMS's supported rational numbers.