Module Name:    src
Committed By:   joerg
Date:           Tue Mar 25 17:30:15 UTC 2014

Modified Files:
        src/tests/lib/libm: t_libm.h

Log Message:
Consistently use long double.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libm/t_libm.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/lib/libm/t_libm.h
diff -u src/tests/lib/libm/t_libm.h:1.5 src/tests/lib/libm/t_libm.h:1.6
--- src/tests/lib/libm/t_libm.h:1.5	Sun Mar 16 22:49:27 2014
+++ src/tests/lib/libm/t_libm.h	Tue Mar 25 17:30:14 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: t_libm.h,v 1.5 2014/03/16 22:49:27 dsl Exp $ */
+/* $NetBSD: t_libm.h,v 1.6 2014/03/25 17:30:14 joerg Exp $ */
 
 /*
  * Check result of fn(arg) is correct within the bounds.
@@ -7,12 +7,15 @@
  * be out of range for the function - so save and print as 'long double'.
  * (otherwise you can get 'inf != inf' reported!)
  */
-#define T_LIBM_CHECK(subtest, fn, arg, expect, epsilon) do { \
+#define T_LIBM_CHECK(subtest, fn, arg, expect_, epsilon_) do { \
+	long double epsilon = epsilon_; \
+	long double expect = expect_; \
 	long double r = fn(arg); \
-	double e = fabs(r - expect); \
+	long double e = fabsl(r - expect); \
 	if (r != expect && e > epsilon) \
 		atf_tc_fail_nonfatal( \
-		    "subtest %u: " #fn "(%g) is %Lg (%.14La) not %g (%.13a), error %g (%.6a) > %g", \
+		    "subtest %u: " #fn "(%g) is %Lg (%.14La) " \
+		    "not %Lg (%.13La), error %Lg (%.6La) > %Lg", \
 		    subtest, arg, r, r, expect, expect, e, e, epsilon); \
     } while (0)
 

Reply via email to