summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorRaghuveer Devulapalli <raghuveer.devulapalli@intel.com>2019-05-23 09:38:59 -0700
committerRaghuveer Devulapalli <raghuveer.devulapalli@intel.com>2019-08-03 10:50:04 -0700
commit8589d4839dab4158abe1b241390c3d3838445721 (patch)
tree29a54c5cebd3395fc64d35e5a8c2db68cba9be92 /numpy
parentcd9f1a87d6f200b3ccb4be7dc646b4832b321ba9 (diff)
downloadnumpy-8589d4839dab4158abe1b241390c3d3838445721.tar.gz
TEST: Rounding max tolerable ulp error to an int
The assert_array_max_ulp returns only an int since it compares ULP difference between two float32 numbers.
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/tests/test_umath.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/core/tests/test_umath.py b/numpy/core/tests/test_umath.py
index 747d893c2..95078b52b 100644
--- a/numpy/core/tests/test_umath.py
+++ b/numpy/core/tests/test_umath.py
@@ -700,20 +700,20 @@ class TestSIMDFloat32(object):
np.random.seed(42)
x_f32 = np.float32(np.random.uniform(low=0.0,high=88.1,size=1000000))
x_f64 = np.float64(x_f32)
- assert_array_max_ulp(np.exp(x_f32), np.float32(np.exp(x_f64)), maxulp=2.6)
+ assert_array_max_ulp(np.exp(x_f32), np.float32(np.exp(x_f64)), maxulp=3)
def test_log_float32(self):
np.random.seed(42)
x_f32 = np.float32(np.random.uniform(low=0.0,high=1000,size=1000000))
x_f64 = np.float64(x_f32)
- assert_array_max_ulp(np.log(x_f32), np.float32(np.log(x_f64)), maxulp=3.9)
+ assert_array_max_ulp(np.log(x_f32), np.float32(np.log(x_f64)), maxulp=4)
def test_sincos_float32(self):
np.random.seed(42)
x_f32 = np.float32(np.random.uniform(low=-100.,high=100.,size=1000000))
x_f64 = np.float64(x_f32)
- assert_array_max_ulp(np.sin(x_f32), np.float32(np.sin(x_f64)), maxulp=1.5)
- assert_array_max_ulp(np.cos(x_f32), np.float32(np.cos(x_f64)), maxulp=1.5)
+ assert_array_max_ulp(np.sin(x_f32), np.float32(np.sin(x_f64)), maxulp=2)
+ assert_array_max_ulp(np.cos(x_f32), np.float32(np.cos(x_f64)), maxulp=2)
def test_strided_float32(self):
np.random.seed(42)