diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2008-04-30 23:30:57 (GMT) |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2008-04-30 23:30:57 (GMT) |
commit | a0de26c3427b63efcd0a678c5d686b4df9f105e4 (patch) | |
tree | 359d9467600c47eb14c3a1926e6a9ebda7720bb3 /Lib/test/ieee754.txt | |
parent | 3cbf15f07a72c1dad2196975448ce18725f18c08 (diff) | |
download | cpython-a0de26c3427b63efcd0a678c5d686b4df9f105e4.zip cpython-a0de26c3427b63efcd0a678c5d686b4df9f105e4.tar.gz cpython-a0de26c3427b63efcd0a678c5d686b4df9f105e4.tar.bz2 |
Make floating-point exception error messages slightly more verbose: in
particular, the error message now allows one to distinguish between a
ValueError arising from a singularity (e.g. log(0.)), which would
usually produce +-infinity in non-stop mode, and a ValueError resulting
from an invalid input (e.g. sqrt(-1.)), which would normally produce a
NaN in non-stop mode.
Diffstat (limited to 'Lib/test/ieee754.txt')
-rw-r--r-- | Lib/test/ieee754.txt | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Lib/test/ieee754.txt b/Lib/test/ieee754.txt index 5a41c8f..a07906c 100644 --- a/Lib/test/ieee754.txt +++ b/Lib/test/ieee754.txt @@ -127,31 +127,31 @@ Trigonometric Functions >>> sin(INF) Traceback (most recent call last): ... -ValueError: math domain error +ValueError: math domain error (invalid argument) >>> sin(NINF) Traceback (most recent call last): ... -ValueError: math domain error +ValueError: math domain error (invalid argument) >>> sin(NAN) nan >>> cos(INF) Traceback (most recent call last): ... -ValueError: math domain error +ValueError: math domain error (invalid argument) >>> cos(NINF) Traceback (most recent call last): ... -ValueError: math domain error +ValueError: math domain error (invalid argument) >>> cos(NAN) nan >>> tan(INF) Traceback (most recent call last): ... -ValueError: math domain error +ValueError: math domain error (invalid argument) >>> tan(NINF) Traceback (most recent call last): ... -ValueError: math domain error +ValueError: math domain error (invalid argument) >>> tan(NAN) nan @@ -169,11 +169,11 @@ True >>> asin(INF), asin(NINF) Traceback (most recent call last): ... -ValueError: math domain error +ValueError: math domain error (invalid argument) >>> acos(INF), acos(NINF) Traceback (most recent call last): ... -ValueError: math domain error +ValueError: math domain error (invalid argument) >>> equal(atan(INF), PI/2), equal(atan(NINF), -PI/2) (True, True) |