diff options
author | Raghuveer Devulapalli <raghuveer.devulapalli@intel.com> | 2019-05-29 20:55:35 -0700 |
---|---|---|
committer | Raghuveer Devulapalli <raghuveer.devulapalli@intel.com> | 2019-08-03 10:50:04 -0700 |
commit | 6f34f5faa0c4e50e822c6aee01e074785fc86f33 (patch) | |
tree | 01cc5d2818595bb5ddeacee15ef37aefc5f81ecb /numpy | |
parent | 44d14ab5bdee2d9a1ec7e3b9c5d41593ac855c54 (diff) | |
download | numpy-6f34f5faa0c4e50e822c6aee01e074785fc86f33.tar.gz |
TEST: improving test coverage for sin/cos for input > 117435.992f
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/tests/test_umath.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/numpy/core/tests/test_umath.py b/numpy/core/tests/test_umath.py index 95078b52b..ef48fed05 100644 --- a/numpy/core/tests/test_umath.py +++ b/numpy/core/tests/test_umath.py @@ -710,7 +710,12 @@ class TestSIMDFloat32(object): def test_sincos_float32(self): np.random.seed(42) - x_f32 = np.float32(np.random.uniform(low=-100.,high=100.,size=1000000)) + N = 1000000 + M = np.int(N/20) + index = np.random.randint(low=0, high=N, size=M) + x_f32 = np.float32(np.random.uniform(low=-100.,high=100.,size=N)) + # test coverage for elements > 117435.992f for which glibc is used + x_f32[index] = np.float32(10E+10*np.random.rand(M)) x_f64 = np.float64(x_f32) 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) |