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

Re: [Scheme-reports] grammar of numbers



On Fri, Nov 15, 2013 at 2:14 PM, Michael Montague <mikemon@x> wrote:
The grammar of numbers on p. 62 appears to require that complex numbers
without a real part must have a sign on the imaginary part.

For example, 100i must be written as +100i. Chibi happily accepts 100i
and treats it as 0+100i.

Is there an error in the grammar or is Chibi providing an extension?

Chibi is providing an extension.

The grammar for complex numbers without a real
part is quite explicitly making the sign mandatory,
and this goes back to R4RS.  I don't know offhand
what the rationale was - the only thing that comes
to mind is symmetry with the fact that i by itself
requires a sign to distinguish from the favored index
variable.

-- 
Alex

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