3 ms·
> Because numerators and denominators can blow up easily, rational types effectively require storing them as bigints. That makes them bad from a performance vie
by e12e 4y ago
> Because numerators and denominators can blow up easily, rational types effectively require storing them as bigints. That makes them bad from a performance viewpoint.
While hardware support for full number towers might be neat, I don't think anyone is suggesting that int and floats should not have language/standard library support - only that there should be a blessed option for precise arithmetic.
Usually the slow correct answer is preferable to the quick wrong answer (esp in business logic).