diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2013-10-28 09:36:01 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2013-10-28 09:36:01 +0000 |
commit | 49d287509d4d0cd2ce1e86621c54ac85bbe9b59c (patch) | |
tree | c4e95c56c4e8c8f7a96da205d81f0fed3af659d7 | |
parent | b5fa9dd5cb6e5ccefc42db03db0090799529b160 (diff) | |
download | mpfr-49d287509d4d0cd2ce1e86621c54ac85bbe9b59c.tar.gz |
[tests/tsum.c] Added a TODO comment: add generic random test with
cancellations, and tests with intermediate overflows.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8698 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r-- | tests/tsum.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/tsum.c b/tests/tsum.c index 76300b634..ae235540e 100644 --- a/tests/tsum.c +++ b/tests/tsum.c @@ -20,6 +20,18 @@ along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ +/* TODO: add some generic random test with cancellations. Something like: + 1. Generate random numbers with random precisions. + 2. Compute the sum s at some random precision and some rounding mode. + 3. While s != 0: + 4. Include -s in the array. + 5. Reorder the terms randomly. + 6. Recompute a new sum s' at some random precision and some rounding mode. + 7. Check that |s'| < ulp(s), with a factor 1/2 for MPFR_RNDN. + 8. Reiterate at (3) with s = s'. + Also add tests with intermediate overflows. +*/ + #include "mpfr-test.h" static int |