Hugs Humor

Jon Fairbairn
Tue, 08 Jul 2003 13:06:23 +0100

On 2003-07-08 at 10:15+0200 Jerzy Karczmarczuk wrote:
>  > If it's a _Rational_, surely you want it to be exactly the
>  > same as you get for 31415926536%10000000000?
> No. If 'you' means concretely me, then no. Simply no.
> Writing
> pi = 3.1415926536 :: Rational
> and expecting to continue the computations with an exact fraction
> 31415926536%10000000000, with the well known explosion of Nums &
> Dens seems pragmatically silly.

Ah, well, I'd say that writing

  pi = 3.1415926536 :: Rational

is just misleading -- we all know jolly well that pi isn't a
rational, so anyone who writes that deserves what they get.

Now, if you were to write

  pi = 3.1415926536 :: Real

I'd be happy to argue over just what the conversion is
supposed to do. Unfortunately we don't have Real (in
libraries as far as I remember -- if you have a continued
fraction implementation of it, it ought to go to the
libraries list).



Jón Fairbairn                       
31 Chalmers Road                               
Cambridge CB1 3SZ            +44 1223 570179 (after 14:00 only, please!)