Sorry about that. In the e-mail text field I wrote sinh(tanh(x)) and cosh(tanh(x)) where it was supposed to be sinh(atanh(x)) and cosh(atanh(x)), thus I am talking about the inverse hyperbolic tangent function. The patch code and comments are still correct.
On Wed, Aug 8, 2018 at 10:58 AM, Paul Koning <paulkon...@comcast.net> wrote: > Now I'm puzzled. > > I don't see how an infinite would show up in the original expression. I > don't know hyperbolic functions, so I just constructed a small test program, > and the original vs. the substitution you mention are not at all similar. > > paul > > >> On Aug 7, 2018, at 4:42 PM, Giuliano Augusto Faulin Belinassi >> <giuliano.belina...@usp.br> wrote: >> >> That is a good question because I didn't know that such targets >> exists. Any suggestion? >> >> >> On Tue, Aug 7, 2018 at 5:29 PM, Paul Koning <paulkon...@comcast.net> wrote: >>> >>> >>>> On Aug 7, 2018, at 4:00 PM, Giuliano Augusto Faulin Belinassi >>>> <giuliano.belina...@usp.br> 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? >>> >>> paul >>> >>> >