You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/05/05 13:06:06 UTC

[incubator-nuttx] branch master updated: lib_modfl: Use fabsl instead of fabs for long double arguments

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 9b8399e  lib_modfl: Use fabsl instead of fabs for long double arguments
9b8399e is described below

commit 9b8399effe9b5fa0d64868491f2486d4dfe2e611
Author: Jukka Laitinen <ju...@ssrc.tii.ae>
AuthorDate: Wed May 5 13:58:33 2021 +0300

    lib_modfl: Use fabsl instead of fabs for long double arguments
    
    Signed-off-by: Jukka Laitinen <ju...@ssrc.tii.ae>
---
 libs/libc/math/lib_modfl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libs/libc/math/lib_modfl.c b/libs/libc/math/lib_modfl.c
index 6e2260e..b28f2aa 100644
--- a/libs/libc/math/lib_modfl.c
+++ b/libs/libc/math/lib_modfl.c
@@ -42,12 +42,12 @@
 #ifdef CONFIG_HAVE_LONG_DOUBLE
 long double modfl(long double x, long double *iptr)
 {
-  if (fabs(x) >= 4503599627370496.0)
+  if (fabsl(x) >= 4503599627370496.0)
     {
       *iptr = x;
       return 0.0;
     }
-  else if (fabs(x) < 1.0)
+  else if (fabsl(x) < 1.0)
     {
       *iptr = (x * 0.0);
       return x;