4 ms·
Rationals have their own set of issues: 1) it's really slow slow. Adding two fractions involves three integer multiplications and then running the GCD to simpl
by dahfizz 4y ago
Rationals have their own set of issues:
1) it's really slow slow. Adding two fractions involves three integer multiplications and then running the GCD to simplify the fractions.
2) just simply comparing two rational numbers involves multiplication, which may overflow.
3) you can't represent irrational numbers. You can't do square roots, for example.
- ketzu 4y agoYes, all systems will have some drawbacks. My response was only geared towards this part: > numbers like 1/10 and 1/3 can only be approximated in a finite number of bits Maybe I should have been more explicit.