Skip to content
Commit 60463383 authored by Szabolcs Nagy's avatar Szabolcs Nagy
Browse files

Prevent fenv access breaking optimizations of the ulp tool

The ulp tool compares output of a math function to a larger precision
implementation of the same function.

But when the input argument is converted to a larger precision number
the signaling nan property is lost, so ensure that the conversion
happens inside the critical region where fenv exceptions are checked
and then the conversion itself will raise the invalid exception, which
is the correct behaviour in most cases.

The volatile barrier is not perfect and the snan behaviour is not
always signaling, but this should give more reliable results in most
cases than before.
parent ef987d37
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment