From 771fabc6d5379e64e5ab9e5f1ca6eb5960617432 Mon Sep 17 00:00:00 2001 From: Anatoly Trosinenko Date: Fri, 14 Nov 2014 14:21:35 +0300 Subject: [PATCH] Take a float absolute value using fabs() instead of abs(). Replace integer abs() by floating point fabs() in the approximate equality check for float values. --- testsuite/libffi.call/cls_many_mixed_args.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/libffi.call/cls_many_mixed_args.c b/testsuite/libffi.call/cls_many_mixed_args.c index e4b1eb1..7fd6c82 100644 --- a/testsuite/libffi.call/cls_many_mixed_args.c +++ b/testsuite/libffi.call/cls_many_mixed_args.c @@ -63,7 +63,7 @@ int main (void) res = (((cls_ret_double)code))(0.1, 0.2, 0.3, 0.4, 5, 0.6, 0.7, 0.8, 0.9, 10, 1.1, 12, 1.3, 14, 1.5, 16); - if (abs(res - expected) < FLT_EPSILON) + if (fabs(res - expected) < FLT_EPSILON) exit(0); else abort(); -- 2.7.4