Decimal Literals
Ashley Yakeley
ashley@semantic.org
Thu, 10 Jul 2003 23:00:18 -0700
In article <3F095C21.8020601@info.unicaen.fr>,
Jerzy Karczmarczuk <karczma@info.unicaen.fr> wrote:
> If I were to write
>
> pi = 3.1415926536 :: Rational
>
> I suppose that I would like to see rather 355/113 or something close,
> than 3926990817/1250000000 or similar.
There should be a separate syntax for that. As it stands, the string
"3.1415926536" unambiguously specifies a rational number. Perhaps
something like "3.1415926536..." should be interpreted as the 'simplest'
rational that agrees with the given digits, which would then be passed
to fromRational.
Also, it might be nice to be able to specify the recurring digits of
other rationals, for instance
0._3 = 1/3
0.29_54 = 13/44
etc.
--
Ashley Yakeley, Seattle WA