scsh-users
[Top] [All Lists]

Re: bug in scsh (scheme48 ?)

To: scsh@zurich.csail.mit.edu
Subject: Re: bug in scsh (scheme48 ?)
From: Andreas Bernauer <andreas.bernauer@gmx.de>
Date: Tue, 20 Jan 2004 10:26:03 -0500
Cc: david wallin <david.wallin@ul.ie>
Mail-followup-to: scsh@zurich.csail.mit.edu, david wallin <david.wallin@ul.ie>
david wallin wrote:
> (string->number "2e-05")
> 
> returns #f.
> 
> Guile return 2.0e-05 while {Dr|Mz}scheme returns 2e-05.

Looks like you have to use the same format as number->string returns?

> 0.0000000002
2.e-10
> (string->number "2.e-10")
2.e-10

R5RS is not so clear about that.  In 6.2.6 "Numerical input and
output", it says that string->number may return #f, if the string
given is not syntactically correct.  If this refers to 7.1.1 "Lexical
structure", scsh behaves wrong, if this refers to the used
representation for numbers in scsh, string->number behaves correct:

> 2e-09

Error: undefined variable
       2e-09
       (package user)

I agree, that scsh should recognize 2e-09 as a number, as this is
stated like this in R5RS (if I read it correctly).  However, it
somehow looks the developers did this on purpose (?).

Andreas.

<Prev in Thread] Current Thread [Next in Thread>