|
|
|
|
|
by Isognoviastoma
629 days ago
|
|
- after few operations denominator exceeds 64-bit range, so you either need bigint, or make fractions approximate, what is in affect fixed point - often you use decimal fraction on output and input anyway - it's slower, even slower with bigint - no square root, sin, and so on with rationals |
|
Better statement would be "no standard definition possible for square root, sin, and so on with rationals", as rationals with unbounded denominators don't have an inherent precision limit---something like ulps in floating point systems---and the max denominator wouldn't be a good choice for precision even when denominator is limited. Every such function now has to be given an explicit denominator value or similar strategy, which complicates both the interface and implementation.