[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Scheme-reports] Strong win later reversed: Real numbers have imaginary part #e0



Alex Shinn <alexshinn@x> writes:

> On Mon, Dec 24, 2012 at 7:51 AM, Mark H Weaver <mhw@x> wrote:
>
>     What external representation will you use for these numbers?  For
>     example, even if you can efficiently handle something like this:
>     
>       (do ((i 10000000 (- i 1))
>            (x 1e300 (expt x x)))
>           ((zero? i) (/ x)))
>     
>     What will you do if someone applies 'number->string' to the
>     result?
>     
> It will use Conway's chained arrow notation, as mentioned
> in my previous mail.
>
> What you're describing here is just tetration:
>
>   (tetrate 1e300 100000000)

That's not quite right, but anyway the precise value of this number is
not relevant to my point.  My question was about how such numbers would
be printed, and your answer was that it might look something like this:

>   1/1e300->1e7->2

My point is that the results of ordinary inexact numerical computations
that are printed 0.0 on virtually every other system will apparently be
printed in a non-standard notation in future Chibi.

This will cause problems for portable programs that use 'number->string'
on inexact numbers to produce output that is meant to be read by another
program.

Sections 6.2.5 and 7.1.1 of R7RS-draft-8 describe the syntax of
numerical constants, and authors of portable R7RS code may reasonably
expect that 'number->string' will use that syntax when applied to
inexact complex numbers.

     Mark

_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports