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

Re: Floating point question



John Montgomery wrote:

> I asked the list recently how to deal with floating point exceptions
> resulting from underflows.  I was advised that I could use the -miee
> flag, but that my code would run slower.  Subsequent experimentation has
> indicated how true this is - my code now works, but runs almost 3 times
> slower than under Digital Unix.  So I wonder
>
> 1) Why is ieee so much slower?
>
> 2) How is this problem handled on Digital Unix?
>
> Some of my factor of 3 is due to having used a better compiler on
> Digital Unix, but probably not all of it.  What else is going on?
> I'll be grateful for any insights that people might have about this.

Have you tried libffm?  If not, the problem is definitely the math
library.  The one in glibc is vastly slower than either libffm or Digital
Unix.

As I recall, your problem was underflows in exp() due to large negative
arguments.  libffm returns zero by default, without -mieee.

http://people.frankfurt.netsurf.de/Joachim.Wesner/

Zeen,

-Adam `Cold Fusion' Powell, IV http://www.ctcms.nist.gov/~powell/ ____
USDoC, National Institute of Standards & Technology (NIST)  |\ ||<  |
Center for Theoretical and Computational Materials Science  | \||_> |





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