GNU bug report logs -
#18295
Radix points in non-decimal numbers
Previous Next
Full log
View this message in rfc822 format
Severity : wishlist
Occasionally it is handy to use a radix point in bases other than
decimal. i.e. 1.1 in binary is 1.5 decimal.
In Guile (stable-2.0), at the moment, this gives an error.
scheme@(guile-user)> #b1.1
While reading expression:
ERROR: In procedure scm_lreadr: #<unknown port>:1:6: unknown # object
We already support this in the output of string->number
scheme@(guile-user)> (number->string 1.5 2)
$1 = "1.1"
Obviously this is not required by either the R5RS (and presumably the
R7RS) or the R6RS, which special case the point for decimals only,
however, Racket does let you do this.
--
Ian Price -- shift-reset.com
"Programming is like pinball. The reward for doing it well is
the opportunity to do it again" - from "The Wizardy Compiled"
This bug report was last modified 10 years and 258 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.