diff options
| author | Paul Eggert | 2018-08-18 16:13:04 -0700 |
|---|---|---|
| committer | Paul Eggert | 2018-08-18 16:13:34 -0700 |
| commit | 1d2df2fd03f35ca8d8dfc8b999d8bba3c7c13157 (patch) | |
| tree | d399dd6434fc2da905c660eea0ce919e746c8951 /test/src/data-tests.el | |
| parent | 97d273033b523bc07911c848d4e8bf96cdce0c90 (diff) | |
| download | emacs-1d2df2fd03f35ca8d8dfc8b999d8bba3c7c13157.tar.gz emacs-1d2df2fd03f35ca8d8dfc8b999d8bba3c7c13157.zip | |
Improve bignum comparison (Bug#32463#50)
* src/data.c (isnan): Remove, as we can assume C99.
(bignumcompare): Remove, folding its functionality
into arithcompare.
(arithcompare): Compare bignums directly here.
Fix bugs when comparing NaNs to bignums.
When comparing a bignum to a fixnum, just look at the
bignum’s sign, as that’s all that is needed.
Decrease scope of locals when this is easy.
* test/src/data-tests.el (data-tests-bignum): Test bignum vs NaN.
Diffstat (limited to 'test/src/data-tests.el')
| -rw-r--r-- | test/src/data-tests.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/src/data-tests.el b/test/src/data-tests.el index 85cbab26106..688c32d6eeb 100644 --- a/test/src/data-tests.el +++ b/test/src/data-tests.el | |||
| @@ -551,7 +551,10 @@ comparing the subr with a much slower lisp implementation." | |||
| 551 | (should (= b0 b0)) | 551 | (should (= b0 b0)) |
| 552 | 552 | ||
| 553 | (should (/= b0 f-1)) | 553 | (should (/= b0 f-1)) |
| 554 | (should (/= b0 b-1)))) | 554 | (should (/= b0 b-1)) |
| 555 | |||
| 556 | (should (/= b0 0.0e+NaN)) | ||
| 557 | (should (/= b-1 0.0e+NaN)))) | ||
| 555 | 558 | ||
| 556 | (ert-deftest data-tests-+ () | 559 | (ert-deftest data-tests-+ () |
| 557 | (should-not (fixnump (+ most-positive-fixnum most-positive-fixnum))) | 560 | (should-not (fixnump (+ most-positive-fixnum most-positive-fixnum))) |