[Top][All Lists]

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

bug#18295: Radix points in non-decimal numbers

From: Ian Price
Subject: bug#18295: Radix points in non-decimal numbers
Date: Tue, 19 Aug 2014 10:04:45 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

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"

reply via email to

[Prev in Thread] Current Thread [Next in Thread]