mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-01 04:10:18 +02:00
Add tests for 'exp' and 'expt' that should produce complex NaNs
* test-suite/tests/numbers.test (exp, expt): Add tests that should produce complex NaNs, but apparently don't on all systems.
This commit is contained in:
parent
880e114b9d
commit
cc26b9de1d
1 changed files with 11 additions and 1 deletions
|
@ -332,7 +332,16 @@
|
|||
(eqv-loosely? 1.0 (exp 0+6.28318i)))
|
||||
|
||||
(pass-if "exp(2-pi*i) = -e^2"
|
||||
(eqv-loosely? (- const-e^2) (exp 2.0-3.14159i))))
|
||||
(eqv-loosely? (- const-e^2) (exp 2.0-3.14159i)))
|
||||
|
||||
(pass-if "exp(+inf.0i) = nan.0+nan.0i"
|
||||
(complex-nan? (exp +inf.0i)))
|
||||
(pass-if "exp(+nan.0i) = nan.0+nan.0i"
|
||||
(complex-nan? (exp +nan.0i)))
|
||||
(pass-if "exp(inf.0+inf.0i) = nan.0+nan.0i"
|
||||
(complex-nan? (exp +inf.0+inf.0i)))
|
||||
(pass-if "exp(inf.0-inf.0i) = nan.0+nan.0i"
|
||||
(complex-nan? (exp +inf.0-inf.0i))))
|
||||
|
||||
;;;
|
||||
;;; odd?
|
||||
|
@ -4021,6 +4030,7 @@
|
|||
(pass-if (real-nan? (expt 0 -1.0)))
|
||||
(pass-if (real-nan? (expt 0.0 -1)))
|
||||
(pass-if (real-nan? (expt 0.0 -1.0)))
|
||||
(pass-if (complex-nan? (expt 0.0 -1.0+1.0i)))
|
||||
(pass-if (eqv? 0 (expt 0 3)))
|
||||
(pass-if (= 0 (expt 0 4.0)))
|
||||
(pass-if (eqv? 0.0 (expt 0.0 5)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue