This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fold sqrt comparisons against constants
- From: Roger Sayle <roger at www dot eyesopen dot com>
- To: Daniel Egger <degger at fhm dot edu>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 16 Mar 2003 16:29:00 -0700 (MST)
- Subject: Re: [PATCH] Fold sqrt comparisons against constants
On 17 Mar 2003, Daniel Egger wrote:
> One minor question though:
>
> + /* sqrt(x) < y is always false, if y is negative. */
>
> Should this rather be '<='?
The comments describe the class of transformation. If you look at
the code immediately below the comment you'll see that we transform
"sqrt(x) < y", "sqrt(x) <= y" and "sqrt(x) == y" all into false, if
y is negative.
Roger
--