[racket] read of numbers with decimal point default toexact?

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Fri Jul 23 08:39:50 EDT 2010

Oh, and I should also have pointed out that you can use to design your
own language so that "#lang decimalexact" or something like that would
have the properties Neil wanted.

Robby

On Fri, Jul 23, 2010 at 7:24 AM, Jos Koot <jos.koot at telefonica.net> wrote:
> Sorry about being pedantic.
> Thinking about the default, I don't think I would object against Neil's
> proposal.
> Nevertheless a constant such as pi should remain inexact, I think.
> Robby findler already mentioned read-decimal-as-inexact.
> Jos
>
>> -----Original Message-----
>> From: Stephen Bloch [mailto:bloch at adelphi.edu]
>> Sent: 23 July 2010 12:31
>> To: neil at neilvandyke.org; users at racket-lang.org;
>> jos.koot at telefonica.net
>> Subject: Re: [racket] read of numbers with decimal point
>> default toexact?
>>
>> >>> "Jos Koot" <jos.koot at telefonica.net> 07/23/10 5:24 AM >>>
>> >>  (/ (read (open-input-string "#e5.55")) #e1.11)
>>
>> >> 5.55 and 1.11 are read as inexact reals, which are
>> flonums. In fact
>> >> in Racket all reals are rationals.
>> >> There is good reason to distinguish exact reals from inexact ones,
>> >> because arithmetic operations on flonums usually are much faster.
>>
>> I think Neil understands the above perfectly well; as I read
>> it, his suggestion was that, *by default*, the Racket reader
>> should choose correctness over efficiency, while allowing the
>> programmer to choose efficiency (via exact->inexact) if (s)he wishes.
>>
>> Stephen Bloch
>
>
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/users
>


Posted on the users mailing list.