Martin Ling <martin-uf...@earth.li> writes:

> -ffast-math:
>
> "This option is not turned on by any -O option besides -Ofast, since it
> can result in incorrect output for programs that depend on an exact
> implementation of IEEE or ISO rules/specifications for math functions.
> It may, however, yield faster code for programs that do not require the
> guarantees of these specifications."
>
> Or more succintly from an older version of that documentation:
>
> "Might allow some programs designed to not be too dependent on IEEE
> behavior for floating-point to run faster, or die trying."
>
> Since neither UFRaw nor Lensfun are deliberately designed this way
> (and doing so would require also tracking GCC changes to see what else
> might break with each new compiler version), I think it's reasonable to
> say it's not a bug for UFRaw to fail when compiled with that option.
>
> -O3 should always be fine though.

This doesn't seem like a bug in ufraw.

IEEE 754 requires a specific answer for each computation, with the
tricky bits being in rounding and intermediate precision.  i386 has
extra-precision registers, and reordering computation can produce
different results.  So I think the kinds of things fast-math *should* be
getting into trouble with is computations where it's considered a bug to
get an answer which is different in the lowest-order bits, or when the
thing to be computed is unstable.  Getting 0 instead of 800 for the line
in question is not a case like that, and I think is likely to be an
outright optimizer bug rather than the case being warned about.

Given all that, I think it makes sense for ufraw not to ask for
fast-math.

Attachment: pgpkMzkhIp9Tv.pgp
Description: PGP signature

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
ufraw-devel mailing list
ufraw-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ufraw-devel

Reply via email to