|
Message-ID: <ZrJFS7IKq3cuM6v1@voyager> Date: Tue, 6 Aug 2024 17:46:19 +0200 From: Markus Wichmann <nullplan@....net> To: musl@...ts.openwall.com Cc: Damian McGuckin <damianm@....com.au> Subject: Re: Special cases in csinh and ctanh Am Wed, Aug 07, 2024 at 12:02:59AM +1000 schrieb Damian McGuckin: > I realise that 'y - y' creates a NaN when y is either an Infinity or NaN. > Won't that also raise an INVALID exception? > Yes it will. As it should, since it calculates a new NaN where there wasn't one before (and, one layer up, csinh(0 + ∞ i) IS an invalid operation). y - y does NOT raise invalid if y already is QNaN. > What does > > x * (y - y) > > achieve that y - y does not (in the above) > The version in ctanh() sets the real part to 0 if x is zero, while the above always calculates NaN if y is not finite. Otherwise, the sign bit may be different, whatever information the sign bit of a NaN has. Ciao, Markus
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.