Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Thu, 15 Mar 2012 19:22:41 +0100
From: Szabolcs Nagy <nsz@...t70.net>
To: musl@...ts.openwall.com
Subject: Re: correctly rounded sqrt

* Pascal Cuoq <pascal.cuoq@...il.com> [2012-03-15 19:14:09 +0100]:
> >> if (signexp >= 0x7fff) is probably a better check
> > 
> > Haha, this is the second time I stupidly forget sqrt(x) is
> > nonnegative... :-) Fixing it..
> 
> I apologize if this is not relevant ???I admit I followed the discussion with only half my attention??? but note that sqrt(-0.) is -0., so the sign bit may be set in both argument and result of sqrt().

yes, that's handled correctly
we were talking only about the 'hard to round case'
(long double square root significand ends in ..xxx10000000000)

dalias:
meanwhile i realized that a double nan cannot end in 0x400
when converted to long double
so i was wrong about the nan check, it's not needed sorry

(maybe it makes sense to add a small comment to that sqrt.s
because it's not trivial for newcommers)

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.