[PATCH]: cosh is "even", integer rounding functions are "odd"

Roger Sayle roger@eyesopen.com
Sun Nov 12 18:17:00 GMT 2006


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
--



More information about the Gcc-patches mailing list