[Gmp-commit] /var/hg/gmp: mini-gmp tests: Use volatile for floating point var...
mercurial at gmplib.org
mercurial at gmplib.org
Mon Feb 25 17:22:02 CET 2013
details: /var/hg/gmp/rev/ad6a16e4df98
changeset: 15485:ad6a16e4df98
user: Niels M?ller <nisse at lysator.liu.se>
date: Mon Feb 25 17:21:49 2013 +0100
description:
mini-gmp tests: Use volatile for floating point variables.
diffstat:
ChangeLog | 5 ++++-
mini-gmp/tests/t-double.c | 4 +++-
2 files changed, 7 insertions(+), 2 deletions(-)
diffs (32 lines):
diff -r b6058270834c -r ad6a16e4df98 ChangeLog
--- a/ChangeLog Mon Feb 25 15:48:02 2013 +0100
+++ b/ChangeLog Mon Feb 25 17:21:49 2013 +0100
@@ -1,10 +1,13 @@
2013-02-25 Niels Möller <nisse at lysator.liu.se>
+ * mini-gmp/tests/t-double.c (testmain): Declare double variables
+ as volatile, to drop extended precision.
+
* mini-gmp/tests/testutils.c (testfree): New function. Use it
everywhere where test programs deallocate storage allocated via
the mini-gmp allocation functions, including uses of mpz_get_str
for various test failure messages.
-
+
* mpz/limbs_finish.c (mpz_limbs_finish): New file and function.
* mpz/limbs_modify.c (mpz_limbs_modify): New file and function.
* mpz/limbs_read.c (mpz_limbs_read): New file and function.
diff -r b6058270834c -r ad6a16e4df98 mini-gmp/tests/t-double.c
--- a/mini-gmp/tests/t-double.c Mon Feb 25 15:48:02 2013 +0100
+++ b/mini-gmp/tests/t-double.c Mon Feb 25 17:21:49 2013 +0100
@@ -83,7 +83,9 @@
for (i = 0; i < COUNT; i++)
{
- double d, f;
+ /* Use volatile, to avoid extended precision in floating point
+ registers, e.g., on m68k and 80387. */
+ volatile double d, f;
unsigned long m;
int e;
More information about the gmp-commit
mailing list