Skip to content

Commit 4235462

Browse files
committed
Fix negative nan typo
1 parent 243d40b commit 4235462

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

extra/detail/decode_ieee_type.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def decode_decimal32(bits):
1818
result = "-SNAN" if sign else "SNAN"
1919
isnan = True
2020
elif bits & 2080374784 == 2080374784:
21-
result = "-SNAN" if sign else "QNAN"
21+
result = "-QNAN" if sign else "QNAN"
2222
isnan = True
2323
elif bits & 2080374784 == 2013265920:
2424
result = "-INF" if sign else "INF"
@@ -57,7 +57,7 @@ def decode_decimal64(bits):
5757
result = "-SNAN" if sign else "SNAN"
5858
isnan = True
5959
elif bits & 8935141660703064064 == 8935141660703064064:
60-
result = "-SNAN" if sign else "QNAN"
60+
result = "-QNAN" if sign else "QNAN"
6161
isnan = True
6262
elif bits & 8935141660703064064 == 8646911284551352320:
6363
result = "-INF" if sign else "INF"
@@ -100,7 +100,7 @@ def decode_decimal128(bits):
100100
result = "-SNAN" if sign else "SNAN"
101101
isnan = True
102102
elif bits_high & 8935141660703064064 == 8935141660703064064:
103-
result = "-SNAN" if sign else "QNAN"
103+
result = "-QNAN" if sign else "QNAN"
104104
isnan = True
105105
elif bits_high & 8935141660703064064 == 8646911284551352320:
106106
result = "-INF" if sign else "INF"

0 commit comments

Comments
 (0)