id summary reporter owner description type status milestone component version severity resolution keywords cc 62 Rational sum not optimal for overflows nobody Jonathan Turkanis "{{{ The sum of n1/d1 + n2/d2 should be calculated as: L*((n1'*d2'+n2'*d1')/m) ----------------------- (k/m)*d1'*d2' where m = gcd(k, n1'*d2'+n2'*d1') k = gcd(d1, d2) L = gcd(n1, n2) k*d1'=d1 k*d2'=d2 L*n1'=n1 L*n2'=n2 This way overflows are avoided while calculatins the resulting numerator (since division by m is performed before multiplication by L). Manuel.Sequeira@iscte.pt }}}" Bugs closed None None Rejected