guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Floating Point?


From: David Allouche
Subject: Re: Floating Point?
Date: Tue, 9 Sep 2003 11:26:13 +0200
User-agent: Mutt/1.5.4i

On Tue, Sep 09, 2003 at 09:52:26AM +0200, address@hidden wrote:
> No. Arbitrary precision is for integers (it's impossible to do general
> arbitrary precision for reals). Floats in Guile are just machine floats
> (properly wrapped as SCMs, which might make them a tad `slower', though).
> 
> If I see right, they are just machine doubles, referenced indirectly
> through the SCM object (thus the unwrapping costs you a dereference).

Just an idea...

Python had a similar problem: the language overhead dominated
computing time in number crunching applications. This problem was
solved by the implementation of a fast (written in C) matrix crunching
library. The basic idea is "to add 1000 FP numbers, add two matrices
and let the looping be done in C instead of in Scheme". Of course, the
usual collection of algebra is also a nice bonus.

Now, Python, though well known as a generally slow language is
successfully used in many demanding number-crunching applications.

-- 
David Allouche         | GNU TeXmacs -- Writing is a pleasure
Free software engineer |    http://www.texmacs.org
   http://ddaa.net     |    http://savannah.gnu.org/projects/texmacs
   address@hidden  |    address@hidden
TeXmacs is NOT a LaTeX front-end and is unrelated to emacs.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]