From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/14781 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: Patch for cacosh Date: Wed, 2 Oct 2019 13:49:03 +0200 Message-ID: <20191002114902.GC7832@port70.net> References: Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="257907"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.10.1 (2018-07-13) To: musl@lists.openwall.com Original-X-From: musl-return-14797-gllmg-musl=m.gmane.org@lists.openwall.com Wed Oct 02 13:49:18 2019 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1iFd89-0014wV-QP for gllmg-musl@m.gmane.org; Wed, 02 Oct 2019 13:49:17 +0200 Original-Received: (qmail 22137 invoked by uid 550); 2 Oct 2019 11:49:15 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 22114 invoked from network); 2 Oct 2019 11:49:14 -0000 Mail-Followup-To: musl@lists.openwall.com Content-Disposition: inline In-Reply-To: Xref: news.gmane.org gmane.linux.lib.musl.general:14781 Archived-At: * Michael Morrell [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