This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH]: cosh is "even", integer rounding functions are "odd"
- From: Roger Sayle <roger at eyesopen dot com>
- To: "Kaveh R. GHAZI" <ghazi at caip dot rutgers dot edu>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 12 Nov 2006 10:30:23 -0700 (MST)
- Subject: Re: [PATCH]: cosh is "even", integer rounding functions are "odd"
Hi Kaveh,
On Sun, 12 Nov 2006, Kaveh R. GHAZI wrote:
> 2006-11-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
>
> * builtins.c (fold_builtin_cosh): New.
> (fold_builtin_1): Use it.
> * fold-const.c (negate_mathfn_p): Add llround, lround, round,
> trunc to the list of "odd" functions. Also add llrint, lrint,
> rint and nearbyint when flag_rounding_math is false.
>
> * gcc.dg/torture/builtin-symmetric-1.c: Add more cases.
Clever; Using -frounding-math to control the oddness of rint and
nearbyint. This is OK for mainline. Thanks.
Roger
--