This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC PATCH]: Fold (A / A) to 1.0 (not always!)


On Wednesday 26 October 2005 11:29, Uros Bizjak wrote:
> Hello!
>
> This patch should fold (A / A) to 1.0 when A doesn't equal 0.0 (in this
> case, NaN is returned). AFAIK, this transformation is valid only for
> -fno-trapping-math (because 0.0 / 0.0 traps) and for -ffinite-math-only.

The docs for -ffinite-math-old say
"[...] assume that arguments and results are not NaNs [...]"

ie. we can fold this to 1.0 unconditionally.

Paul


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]