From bug-octave-request at bevo dot che dot wisc dot edu Wed Feb 27 14:56:19 2002 Subject: Re: Problem with exp-function From: Paul Kienzle To: Dirk Eddelbuettel , Andreas Helms Cc: bug-octave at bevo dot che dot wisc dot edu Date: Wed, 27 Feb 2002 15:54:41 -0500 MIPS gives 0. The normalized range for 64 bit reals is e+/-308. I'm guessing the problem is with denormalized numbers generating an exception which is not being trapped, whereas the exp(-750) generates an underflow which is being trapped. Indeed, a quick google search for "gcc alpha denormalized" gives: http://gcc.gnu.org/ml/gcc/2001-08/msg01075.html and the follow-up: http://gcc.gnu.org/ml/gcc/2001-08/msg01094.html The suggested work around is to recompile octave with -mieee, which will slow everything down, or to use the compaq library -lcpml rather than -lm. Presumably the c++ counter-example provided was compiled with compaq's compiler rather than gcc. I don't know if octave can be configured to use compaq's compiler instead of gcc --- check the octave mailing list. Paul Kienzle pkienzle at users dot sf dot net On Wed, Feb 27, 2002 at 11:30:46AM -0600, Dirk Eddelbuettel wrote: > On Wed, Feb 27, 2002 at 06:13:22PM +0100, Andreas Helms wrote: > > octave:10> exp(-730) > > error: floating point exception -- trying to return to prompt > > I cannot reproduce this using octave 2.1.35 on Linux - I get 9.2263e-318. > > Dirk > > -- > Good judgement comes from experience; experience comes from bad judgement. > -- Fred Brooks > > > > ------------------------------------------------------------- > Octave is freely available under the terms of the GNU GPL. > > Octave's home on the web: http://www.octave.org > How to fund new projects: http://www.octave.org/funding.html > Subscription information: http://www.octave.org/archive.html > ------------------------------------------------------------- > ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------