Stephen Dickason wrote: > In binary that is 00000001 + 0.0110011001100.... - 0.0110011001100.... because > we hit recurring decimals a lot more in binary than decimal. I wonder why we > don't have a standard format (maybe we do?) that factors in the remainder as > part of the number also?
It's possible to create a type that stores the numerator and denominator, but then you would need to "simplify" to extract common factors on every calculation, otherwise it would quickly run out of range (Integer or whatever you choose). Extracting common factors takes exponential time, so it's quite slow. The range would be quite limited as well, it's as wide as the numerator. Micha _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal