diff options
author | enge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2008-11-14 19:05:06 +0000 |
---|---|---|
committer | enge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2008-11-14 19:05:06 +0000 |
commit | 557a24bf00a2dd653566bd2e02f71ab67ccf9a43 (patch) | |
tree | b419dcfdf542281611ba249b1950e2eb05ee8af7 /tests | |
parent | d60806648496caedd0766eebaadf193775d87617 (diff) | |
download | mpc-557a24bf00a2dd653566bd2e02f71ab67ccf9a43.tar.gz |
some more test cases to get close to a coverage of 100%
git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@315 211d60ee-9f03-0410-a15a-8952a2c7a4e4
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/mul.dat | 8 | ||||
-rw-r--r-- | tests/sqr.dat | 11 |
2 files changed, 17 insertions, 2 deletions
diff --git a/tests/mul.dat b/tests/mul.dat index 1ead20f..362fcf6 100755 --- a/tests/mul.dat +++ b/tests/mul.dat @@ -1,6 +1,6 @@ # Data file for mpc_mul # -# Copyright (C) 2008 Philippe Th\'eveny +# Copyright (C) 2008 Philippe Th\'eveny, Andreas Enge # # This file is part of the MPC Library. # @@ -111,3 +111,9 @@ # big precision uses Karatsuba method 4096 0x1420176785BD601FC018AD36471p-96 4096 -0x1ECCDBDA38B2611A32848E7ADF43p-100 53 0x6B2E363676587p-44 53 0x1AC20AAC49ED37p-47 53 0x12264C57B44C6Bp-53 53 -0x138639A4B8D8B3p-50 N N + +# Karatsuba case where x=0 since ad=bc: (1+i)^2 at artificially high +# precision so that Karatsuba is actually used. +4096 0 4096 2 4096 1 4096 1 4096 1 4096 1 N N +# trigger the line reducing prec_x to prec_u +4096 0 4096 2 40960 1 40960 1 40960 1 40960 1 N N diff --git a/tests/sqr.dat b/tests/sqr.dat index e242f60..0f6eb17 100644 --- a/tests/sqr.dat +++ b/tests/sqr.dat @@ -1,6 +1,6 @@ # Data file for mpc_sqr. # -# Copyright (C) 2008 Philippe Th\'eveny +# Copyright (C) 2008 Philippe Th\'eveny, Andreas Enge # # This file is part of the MPC Library. # @@ -126,3 +126,12 @@ 53 0x3ffffffffffffd 53 -0x7ffffffffffff8p+52 53 -0x1fffffffffffff 53 0x1ffffffffffffe N D 53 -0xE0B72EA626AF3p-44 53 -0x1FFFFFFE00001Dp-49 53 0x1111111000000fp-53 53 -0xf Z D 53 0xfdbac097c8dc58p+2096 53 -0x7f6e5d4c3b2a2p+1036 53 -0xfedcba9876543p+1024 53 0x10000000000001p-42 U D + +# improve test coverage: +# For op=x+i*y, we need a case where x+y and x-y are inexact at the +# higher computing precision, and where x and y do not have too +# distinct exponents so that Karatsuba gets triggered... +# (2^44 + i*(2^29 + 1))^2 \approx (2^88-2^58) + i*2^45*(2^29+1) +30 309485009533114692573069312 30 18889465966662952943616 30 17592186044416 30 536870913 N N +# ...and a case where x+y or x-y are 0. +4 0 4 2 4 1 4 1 N N |