Make tiny volatile to prevent the compiler(s) from
constant folding expressions of the form "1 - tiny", which are used to raise FE_INEXACT.
This commit is contained in:
parent
ec4a0b4408
commit
79c2e69a3f
@ -42,7 +42,8 @@ __FBSDID("$FreeBSD$");
|
||||
#include "math.h"
|
||||
#include "math_private.h"
|
||||
|
||||
static const double one = 1.0, two = 2.0, tiny = 1.0e-300, huge = 1.0e300;
|
||||
static volatile const double tiny = 1.0e-300;
|
||||
static const double one = 1.0, two = 2.0, huge = 1.0e300;
|
||||
|
||||
double
|
||||
tanh(double x)
|
||||
|
@ -19,7 +19,9 @@ __FBSDID("$FreeBSD$");
|
||||
#include "math.h"
|
||||
#include "math_private.h"
|
||||
|
||||
static const float one=1.0, two=2.0, tiny = 1.0e-30, huge = 1.0e30;
|
||||
static volatile const float tiny = 1.0e-30;
|
||||
static const float one=1.0, two=2.0, huge = 1.0e30;
|
||||
|
||||
float
|
||||
tanhf(float x)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user