Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220705153515.GA2522@voyager>
Date: Tue, 5 Jul 2022 17:35:15 +0200
From: Markus Wichmann <nullplan@....net>
To: musl@...ts.openwall.com
Cc: Nikolaos Chatzikonstantinou <nchatz314@...il.com>
Subject: Re: Re: Implementing csqrtl()

On Tue, Jul 05, 2022 at 02:28:32PM +0000, Nikolaos Chatzikonstantinou wrote:
> On Tue, Jul 5, 2022 at 9:37 AM Szabolcs Nagy <nsz@...t70.net> wrote:
> >
> > * Nikolaos Chatzikonstantinou <nchatz314@...il.com> [2022-07-04 11:09:44 +0000]:
> >
> > > +  if ((isinf(x) || isinf(y)) && (isnan(r) || isinf(r))) {
> >
> > why do you need the && ?
> > can r be other than inf or nan?
>
> It's the case that x^2 + y^2 is inf for x,y finite.
>

Yeah, but if x or y is infinite then so is r. So the entire part in
front of the && is redundant, because it is contained in the second
part.

Unless I completely misunderstood how IEEE infinity works...

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.