From 6ed53d9868618118168add067871163fa9e56e4d Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Sat, 3 Sep 2011 17:45:10 +0000 Subject: [PATCH] test: do the trigonometry tests on doubles instead of floats. --- test/trig.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/trig.cpp b/test/trig.cpp index 474f6d17..b1b56376 100644 --- a/test/trig.cpp +++ b/test/trig.cpp @@ -41,18 +41,18 @@ public: { for (int i = -10000; i < 10000; i++) { - float f = (float)i * (1.0f / 1000.0f); + double f = (double)i * (1.0 / 1000.0); double a = __builtin_sin(f); double b = lol_sin(f); - CPPUNIT_ASSERT(fabs(a - b) <= fabs(f) * 1e-10f); + CPPUNIT_ASSERT(fabs(a - b) <= fabs(f) * 1e-11); } for (int i = -10000; i < 10000; i++) { - float f = (float)i * (1.0f / 100000.0f); + double f = (double)i * (1.0 / 100000.0); double a = __builtin_sin(f); double b = lol_sin(f); - CPPUNIT_ASSERT(fabs(a - b) <= fabs(f) * 1e-10f); + CPPUNIT_ASSERT(fabs(a - b) <= fabs(f) * 1e-11); } } };