public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Giuliano Augusto Faulin Belinassi <giuliano.belinassi@usp.br>
To: Paul Koning <paulkoning@comcast.net>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Add sinh(tanh(x)) and cosh(tanh(x)) rules
Date: Wed, 08 Aug 2018 18:57:00 -0000	[thread overview]
Message-ID: <CAEFO=4CLNqEVyVnsE0ZkGwrAc289p+Vowe3MeGzuUaJRjHib-w@mail.gmail.com> (raw)
In-Reply-To: <7AC47F39-364E-4D7D-BC01-690761CA2F09@comcast.net>

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 <paulkoning@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.belinassi@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 <paulkoning@comcast.net> wrote:
>>>
>>>
>>>> On Aug 7, 2018, at 4:00 PM, Giuliano Augusto Faulin Belinassi <giuliano.belinassi@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
>>>
>>>
>

  reply	other threads:[~2018-08-08 18:57 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-07 20:00 Giuliano Augusto Faulin Belinassi
2018-08-07 20:29 ` Paul Koning
2018-08-07 20:42   ` Giuliano Augusto Faulin Belinassi
2018-08-08 13:59     ` Paul Koning
2018-08-08 18:57       ` Giuliano Augusto Faulin Belinassi [this message]
2018-08-08 19:55         ` Paul Koning
2018-10-12  4:55 ` Jeff Law
2018-10-12 14:55   ` Giuliano Augusto Faulin Belinassi
2018-10-16 21:16     ` Jeff Law
2018-10-17 21:43       ` Giuliano Augusto Faulin Belinassi
2018-10-17 22:45         ` Jeff Law
2018-10-18  5:38           ` Giuliano Augusto Faulin Belinassi
2018-10-18 17:10             ` Jeff Law
2018-10-18 22:46               ` Giuliano Belinassi
2018-10-18 23:22 Wilco Dijkstra
2018-10-19 13:39 ` Giuliano Augusto Faulin Belinassi
2018-10-19 13:46   ` Wilco Dijkstra
2018-10-19 14:49     ` Jakub Jelinek
2018-10-19 15:35       ` Wilco Dijkstra
2018-10-19 14:03   ` Segher Boessenkool
2018-10-19 15:10     ` Giuliano Augusto Faulin Belinassi
2018-10-19 17:28       ` Wilco Dijkstra
2018-10-20 19:06         ` Giuliano Augusto Faulin Belinassi
2018-10-22 20:58           ` Jeff Law
2018-10-23  9:52             ` Richard Biener
2018-10-23 11:31               ` Wilco Dijkstra
2018-10-23 11:35                 ` Jakub Jelinek
2018-10-23 12:02                   ` Wilco Dijkstra
2018-11-07 22:21               ` Jeff Law
2018-11-07 22:34                 ` Wilco Dijkstra
2018-11-08  1:44                   ` Segher Boessenkool
2018-11-08 13:33                     ` Wilco Dijkstra
2018-11-09 20:04                       ` Jeff Law
2018-11-09 22:04                         ` Giuliano Augusto Faulin Belinassi
2018-11-10  5:36                         ` Segher Boessenkool
2018-11-12 14:17                           ` Richard Biener
2018-12-02 14:37                       ` Segher Boessenkool

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAEFO=4CLNqEVyVnsE0ZkGwrAc289p+Vowe3MeGzuUaJRjHib-w@mail.gmail.com' \
    --to=giuliano.belinassi@usp.br \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=paulkoning@comcast.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).