This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Add sinh(tanh(x)) and cosh(tanh(x)) rules
- From: Paul Koning <paulkoning at comcast dot net>
- To: Giuliano Augusto Faulin Belinassi <giuliano dot belinassi at usp dot br>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 7 Aug 2018 16:29:16 -0400
- Subject: Re: [PATCH] Add sinh(tanh(x)) and cosh(tanh(x)) rules
- References: <CAEFO=4C+BLJYGHNwuCbjdeY2Xj5KJkBeRRCKmSxqTUqwVokkag@mail.gmail.com>
> On Aug 7, 2018, at 4:00 PM, Giuliano Augusto Faulin Belinassi <email@example.com> wrote:
> Related with bug 86829, but for hyperbolic trigonometric functions.
> This patch adds substitution rules to both sinh(tanh(x)) -> x / sqrt(1
> - x*x) and cosh(tanh(x)) -> 1 / sqrt(1 - x*x). Notice that the both
> formulas has division by 0, but it causes no harm because 1/(+0) ->
> +infinity, thus the math is still safe.
What about non-IEEE targets that don't have "infinite" in their float representation?