Subject: Re: string/numeric conversions?
From: rpw3@rigden.engr.sgi.com (Rob Warnock)
Date: 1998/12/03
Newsgroups: comp.lang.scheme
Message-ID: <745qrr$g1rv7@fido.engr.sgi.com>
Chris Petersen  <chrisp@mvp.net> wrote:
+---------------
| Aha!  So, my textbook should have warned me about the limitations
| of these functions...
+---------------

The "limitation" is not in the functions per se, it's a characteristic
of the basic syntax of Scheme numbers. The printable representation of
floating-point numbers is only defined for decimal. After you download
a copy of R5RS [someone else's reply gave URLs], look in Section 7.1.1
"Lexical structure", especially this little bit:

	"The following rules for <num R>, <complex R>, <real R>, <ureal R>,
	<uinteger R>, and <prefix R> should be replicated for R = 2, 8, 10,
	and 16. There are no rules for <decimal 2>, <decimal 8>, and
	<decimal 16>, which means that numbers containing decimal points
	or exponents must be in decimal radix."

Also see Section 6.2.6 "Numerical input and output". There is some leeway
there for certain unspecified behaviors [intended to allow implementations
to optionally provide extensions for NaNs and infinities], but again, *only*
if the radix is 10 (and the number is inexact).


-Rob

-----
Rob Warnock, 8L-855		rpw3@sgi.com
Applied Networking		http://reality.sgi.com/rpw3/
Silicon Graphics, Inc.		Phone: 650-933-1673
2011 N. Shoreline Blvd.		FAX: 650-964-0811
Mountain View, CA  94043	PP-ASEL-IA