bugMIT/GNU Scheme - Bugs: bug #27513, Gambit's arithmetic puts us to...

 
 

bug #27513: Gambit's arithmetic puts us to shame

Submitted by:  Taylor R. Campbell <riastradh>
Submitted on:  Thu 24 Sep 2009 05:20:59 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Suboptimal behavior
Status: NonePrivacy: Public
Assigned to: Taylor R. Campbell <riastradh>Originator Name: 
Open/Closed: Open
Keywords: 

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

Thu 24 Sep 2009 05:20:59 AM UTC, original submission:

(expt 27 2/3)
;Value: 8.999999999999998

(expt (expt 2 2000) 3/2000)
;The object 114813069527425452423283320117768198402231770208869520047764273682576626139237031385665948631650626991844596463898746277344711896086305533142593135616665318539129989145312280000688779148240044871428926990063486244781615463646388363947317026040466353970904996558162398808944629605623311649536164221970332681344168908984458505602379484807914058900934776500429002716706625830522008132236281291761267883317206598995396418127021779858404042159853183251540889433902091920554957783589672039160081957216630582755380425583726015528348786419432054508915275783882625175435528800822842770817965453762184851149029376, passed as the first argument to integer->flonum, is not in the correct range.

(integer-shift-left (expt 2 50) -1)
;Hardware trap SIGBUS

Gambit gives:

> (expt 27 2/3)

9

> (expt (expt 2 2000) 3/2000)

8

> (arithmetic-shift (expt 2 50) -1)

562949953421312

Taylor R. Campbell <riastradh>
Project MemberIn charge of this item.

 

(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

 

Carbon-Copy List
  • -unavailable- added by riastradh (Submitted the item)
  •  

    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):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup