|
|
|
|
|
by ketzu
1467 days ago
|
|
Rational numbers can also be trated as quotient of two integers and stored with arbitrary precision by storing these two values, even with limited precision of 2x32 bit integers, that would perfectly accurately capture 1/3 and 1/10. But I also don't think it is particularly 'news', the discussion on previous versions centered around the problems that arise from floats, such as inconsistent handling by tools and languages and 'inapropriate use' where the precision from floats is not good enough or misleading. So maybe it is more a "topic of interest". |
|
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.