everything is [rational]

6 Apr
2005
6 Apr
'05
8:06 a.m.
whenever we do arithmetic, we are doing some kind of rational arithmetic: - integer arithmetic is rational arithmetic with all denominators equal to 1 - fixed point arithmetic is rational arithmetic with all denominators being a pre-specified constant - floating point arithmetic is rational arithmetic with denominator values limited to powers of 2 (e.g. 1/3 is represented as 11184811/2^25) - finite rational<> arithmetic is rational arithmetic with denominator values limited to a given range the first three does rounding, so the rule of thumb "behave like int" suggests rational<> should do the same. if we do not do rounding, we have to have some very good reasons for not doing it. br, andras
7372
Age (days ago)
7372
Last active (days ago)
0 comments
1 participants
participants (1)
-
Andras Erdei