Re: code optimizations and numerical research

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

 



p@xxxxxxxxx (Peter Jay Salzman) writes:

> The man page claims that "-ffast-math" may produce wrong results for
> programs that depend on "an exact implementation of IEEE or ISO
> rules/specifications for math functions."
> 
> What exactly does this vague sentence mean?

Read "What Every Computer Scientist Should Know about Floating-Point
Arithmetic:"
    http://www.validlab.com/goldberg/paper.pdf

Unfortunately it's rather hard to understand what these optimizations
do without becoming something of an expert.

As a general rule of thumb, if you do not know the details of IEEE
floating point format, and you are not calculating your precise error
intervals and writing code which relies on them to, e.g., converge--in
other words, if you are just writing code that happens to use floating
point--then you will probably do just fine with -ffast-math.

Ian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux