diff options
author | Pierre Weis <Pierre.Weis@inria.fr> | 2002-05-27 12:06:28 +0000 |
---|---|---|
committer | Pierre Weis <Pierre.Weis@inria.fr> | 2002-05-27 12:06:28 +0000 |
commit | 75ef6798a966b6bbbf3ec1d5181c09bcefb357a5 (patch) | |
tree | ca50d5a02281526640f08d14cd74063fe6558228 | |
parent | 817e451e4832a139a195ebd0369e13f23f427676 (diff) |
Test de sqrt_nat incorrect sur machine 64 bits, corrige
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4844 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | otherlibs/num/test/test_nats.ml | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/otherlibs/num/test/test_nats.ml b/otherlibs/num/test/test_nats.ml index 0985dcec6..bfb26f102 100644 --- a/otherlibs/num/test/test_nats.ml +++ b/otherlibs/num/test/test_nats.ml @@ -129,11 +129,14 @@ done testing_function "sqrt_nat";; test 1 equal_nat (sqrt_nat (nat_of_int 1) 0 1, nat_of_int 1);; -test 2 equal_nat (sqrt_nat (nat_of_string "8589934592") 0 2, +test 2 equal_nat (let n = nat_of_string "8589934592" in + sqrt_nat n 0 (length_nat n), nat_of_string "92681");; -test 3 equal_nat (sqrt_nat (nat_of_string "4294967295") 0 1, +test 3 equal_nat (let n = nat_of_string "4294967295" in + sqrt_nat n 0 (length_nat n), nat_of_string "65535");; -test 4 equal_nat (sqrt_nat (nat_of_string "18446744065119617025") 0 2, +test 4 equal_nat (let n = nat_of_string "18446744065119617025" in + sqrt_nat n 0 (length_nat n), nat_of_string "4294967295");; test 5 equal_nat (sqrt_nat (nat_of_int 15) 0 1, nat_of_int 3);; |