mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com
Subject: Re: Patch for cacosh
Date: Wed, 2 Oct 2019 13:49:03 +0200	[thread overview]
Message-ID: <20191002114902.GC7832@port70.net> (raw)
In-Reply-To: <df809c4a40da4b46a53c4e78c1b20c75@tachyum.com>

* Michael Morrell <mmorrell@tachyum.com> [2019-10-01 21:57:17 +0000]:
> Running the gcc validation suite, I noticed that gfortran.dg/complex_intrinsic_5.f90 was failing when using MUSL.
> 
> I tracked it down to the cacosh routines not getting the correct result when the imaginary part of the argument was negative.

yeah the complex functions are not expected to be correct:
i made no attempt to get all principal values right nor
to deal with fp format special cases (rounding, overflow,..)

i suspect that even with the sign check all sorts of
special cases are wrong (input with large real or imag part),
but if it helps somewhere then i think it's ok to add the
patch (it should just be clear that the implementation
is not expected to be correct, fixing up complex would
be a huge amount of work)

> 
> Attached is a patch to fix this.
> 
>   Michael



      parent reply	other threads:[~2019-10-02 11:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-01 21:57 Michael Morrell
2019-10-01 23:28 ` Rich Felker
2019-10-02 16:45   ` Michael Morrell
2019-10-02 11:49 ` Szabolcs Nagy [this message]

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=20191002114902.GC7832@port70.net \
    --to=nsz@port70.net \
    --cc=musl@lists.openwall.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).