From: Thibault L. <tl...@di...> - 2004-10-14 21:34:06
|
On Thu, 2004-10-14 at 20:51, Sam Steingold wrote: > > * Hoehle, Joerg-Cyril <Wbret-Plevy.Ubruyr@g-flfgrzf.pbz> [2004-10-14 17:39:43 +0200]: > > > > Thibault Langlois wrote: > > > >>I thought that rationals were made of two bignums and that I could not > >>have overflow errors. Am I wrong ? > > > > Well, maybe you should have a look at how large these bignums become, > > you may be surprised. Maybe you should have a look at CL's long float > > type (4 types in CL, only 2 in C et al), and esp. CLISP' settable > > length of these. > > <http://clisp.cons.org/impnotes/num-concepts.html#lfd> Thanks for your answers. Clisp's long-floats are really long :-) ! On cmucl and Lispworks long-float and double-float have the same size. Using long floats is indeed much more efficient. There is also a variant of the algorithm I use (Baum-Welch algorithm for the estimation of HMM to name it) that rescales values during computation but I haven't implemented it yet. I just tried the lazy way using rationals. I expected the calculation eventually last too much time but I was not expecting an overflow error. -- Thibault Langlois <tl...@di...> FCUL / DI |