Re: Problem when computing the power of huge numbers

Faried Nawaz <[email protected]> Thu, 23 Dec 2010 08:34:36 +0100
Newsgroups gmane.lisp.scheme.scheme48
Organization ^self super class.
Message-ID <[email protected]>
Diego Alexander Rojas <[email protected]> writes:

> both give different results both non are the correct one (I checked
> with python, octave and calc). However this functions just start to
> fail when computing very big exponentials, because it didn't fail with
> numbers such as 123 ^ 331

Can you provide an example of a failure?  For me, (fast-exp 123 331) or
(myfast-exp 123 331) return the same value in guile 1.8.7, scheme48 1.8,
and, when translated, in sbcl 1.0.29.11 and python 2.6.5.  I also tried
(myfast-exp 2048 2048) and (myfast-exp 1048578 23456).

This is on a 64 bit Linux desktop, with vendor-provided
interpreters/compilers (Ubuntu 10.04).


Faried.
-- 
(> (length "eclipse") (length "emacs")) => T
Coca Cola, sometimes war
Get noticed, get a job: http://www.youtube.com/watch?v=E2dMmdewRxE