8000 Less stringent normalization test for float128. · matplotlib/matplotlib@a6a08ad · GitHub
[go: up one dir, main page]

Skip to content

Commit a6a08ad

Browse files
committed
Less stringent normalization test for float128.
1 parent f544a83 commit a6a08ad

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/matplotlib/tests/test_colors.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,9 @@ def test_Normalize():
208208
# and for scalar ones.
209209
eps = np.finfo(np.longdouble).resolution
210210
norm = plt.Normalize(1, 1 + 100 * eps)
211-
assert_equal(norm(1 + 50 * eps), .5)
211+
# This returns exactly 0.5 when longdouble is extended precision (80-bit),
212+
# but only a value close to it when it is quadruple precision (128-bit).
213+
assert 0 < norm(1 + 50 * eps) < 1
212214

213215

214216
def test_SymLogNorm():

0 commit comments

Comments
 (0)
0