bugGuile - Bugs: bug #11197, Error in string->number

 
 

bug #11197: Error in string->number

Submitter:  None
Submitted:  Fri 03 Dec 2004 08:10:26 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 08 Dec 2004 11:00:18 PM UTC, comment #2: 

Fixed in the cvs, close this when 1.6.7 is released.

Kevin Ryde <kryde>
Group Member
Sat 04 Dec 2004 10:02:29 PM UTC, comment #1: 

In fact only bases 2, 10 and 16 look right.  Others have a bad bignum size calculation and overflow in various cases.

Only bases 2, 8, 10 and 16 are documented as supported, though others (below 16) are not explicitly rejected.  Maybe that should change too.

Kevin Ryde <kryde>
Group Member
Fri 03 Dec 2004 08:10:26 AM UTC, original submission:  

guile> (string->number "111111" 7)
19608
guile> (string->number "111111" 8)
37449
guile> (string->number "111111" 9)
<unnamed port>:4:1: In procedure bignum in expression (string->number "111111" 9):
<unnamed port>:4:1: Numerical overflow
ABORT: (numerical-overflow)
 
Type "(backtrace)" to get more information or "(debug)" to enter the debugger.
guile> (string->number "111111" 10)
111111
guile> (string->number "111111" 11)
177156

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

Follow 2 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2004-12-28 kryde Open/ClosedOpen Closed
2004-12-08 kryde StatusNone Fixed

Back to the top

Powered by Savane 3.13-3230.
Corresponding source code