Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 14 Aug 2021 14:07:34 +1000 (AEST)
From: Damian McGuckin <damianm@....com.au>
To: musl@...ts.openwall.com
Subject: Re: [PATCH #2] Properly simplified nextafter()

On Fri, 13 Aug 2021, Stefan Kanthak wrote:

>> It may be possible to reduce the number of such ops too; not sure. But
>> there's no way to eliminate them.

Replacing the second FORCE'd expression with

 	FORCE((ux.f + x) * (0x1.0p-52 * 0.25));

eliminates one floating point OP, assuming the optimiser does the 
right thing to

 	epsilon / 4

in the expression. Some preliminary testing seems to suggest that the same 
exceptions get raised.

> It's definitely possible to do a strength reduction and get rid of the
> multiplications.

But then how is the exception still raised, or are we talking soft FP?

Stay safe - Damian

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.