
At 2002-10-10 01:29, Ketil Z. Malde wrote:
I realize it's probably far from trivial, e.g. comparing two equal numbers could easily not terminate, and memory exhaustion would probably arise in many other cases.
I considered doing something very like this for real (computable) numbers, but because I couldn't properly make the type an instance of Eq, I left it. Actually it was worse than that. Suppose I'm adding two numbers, both of which are actually 1, but I don't know that: 1.000000000.... + 0.999999999.... The trouble is, as far as I know with a finite number of digits, the answer might be 1.9999999999937425 or it might be 2.0000000000013565 ...so I can't actually generate any digits at all. So I can't even make the type an instance of my Additive class. Not very useful... -- Ashley Yakeley, Seattle WA