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

 
 

bug #11197: Error in string->number

Submitted by:  None
Submitted on:  Fri 03 Dec 2004 08:10:26 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project 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>
Project 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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Tue 28 Dec 2004 11:26:16 PM UTCkrydeOpen/ClosedOpen=>Closed
Wed 08 Dec 2004 11:00:18 PM UTCkrydeStatusNone=>Fixed

Back to the top


Powered by Savane 3.1-cleanup1