GNU bug report logs - #18295
Radix points in non-decimal numbers

Previous Next

Package: guile;

Reported by: Ian Price <ianprice90 <at> googlemail.com>

Date: Tue, 19 Aug 2014 09:06:01 UTC

Severity: wishlist

Tags: patch

Full log


View this message in rfc822 format

From: Ian Price <ianprice90 <at> googlemail.com>
To: 18295 <at> debbugs.gnu.org
Subject: bug#18295: Radix points in non-decimal numbers
Date: Tue, 19 Aug 2014 10:04:45 +0100
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.