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.
1 file changed