diff mbox series

Replace M_SUF (fabs) with M_FABS

Message ID 20180427170237.21539-1-tuliom@linux.ibm.com
State New
Headers show
Series Replace M_SUF (fabs) with M_FABS | expand

Commit Message

Tulio Magno Quites Machado Filho April 27, 2018, 5:02 p.m. UTC
math-type-macros.h provides the macro M_FABS in order to reference
the correct fabs function for a specific type.
In most of the cases, M_FABS is identical to M_SUF (fabs), but that
may change in the future.

2018-04-27  Tulio Magno Quites Machado Filho  <tuliom@linux.ibm.com>

	* math/w_acos_template.c: Replace M_SUF (fabs) with M_FABS.
	* math/w_asin_template.c: Likewise.
	* math/w_atanh_template.c: Likewise.

Signed-off-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
---
 math/w_acos_template.c  | 2 +-
 math/w_asin_template.c  | 2 +-
 math/w_atanh_template.c | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

Comments

Joseph Myers April 27, 2018, 7:13 p.m. UTC | #1
On Fri, 27 Apr 2018, Tulio Magno Quites Machado Filho wrote:

> math-type-macros.h provides the macro M_FABS in order to reference
> the correct fabs function for a specific type.
> In most of the cases, M_FABS is identical to M_SUF (fabs), but that
> may change in the future.

OK.
Tulio Magno Quites Machado Filho April 27, 2018, 8:16 p.m. UTC | #2
Joseph Myers <joseph@codesourcery.com> writes:

> On Fri, 27 Apr 2018, Tulio Magno Quites Machado Filho wrote:
>
>> math-type-macros.h provides the macro M_FABS in order to reference
>> the correct fabs function for a specific type.
>> In most of the cases, M_FABS is identical to M_SUF (fabs), but that
>> may change in the future.
>
> OK.

Pushed as 06135c33b710.

Thanks!
diff mbox series

Patch

diff --git a/math/w_acos_template.c b/math/w_acos_template.c
index 0861e9fbea..76537b27de 100644
--- a/math/w_acos_template.c
+++ b/math/w_acos_template.c
@@ -29,7 +29,7 @@ 
 FLOAT
 M_DECL_FUNC (__acos) (FLOAT x)
 {
-  if (__glibc_unlikely (isgreater (M_SUF (fabs) (x), M_LIT (1.0))))
+  if (__glibc_unlikely (isgreater (M_FABS (x), M_LIT (1.0))))
     /* Domain error: acos(|x|>1).  */
     __set_errno (EDOM);
   return M_SUF (__ieee754_acos) (x);
diff --git a/math/w_asin_template.c b/math/w_asin_template.c
index a960a92e17..9487ada6ab 100644
--- a/math/w_asin_template.c
+++ b/math/w_asin_template.c
@@ -29,7 +29,7 @@ 
 FLOAT
 M_DECL_FUNC (__asin) (FLOAT x)
 {
-  if (__glibc_unlikely (isgreater (M_SUF (fabs) (x),  M_LIT (1.0))))
+  if (__glibc_unlikely (isgreater (M_FABS (x),  M_LIT (1.0))))
     /* Domain error: asin(|x|>1).  */
     __set_errno (EDOM);
   return M_SUF (__ieee754_asin) (x);
diff --git a/math/w_atanh_template.c b/math/w_atanh_template.c
index d4b2838025..1e528256ff 100644
--- a/math/w_atanh_template.c
+++ b/math/w_atanh_template.c
@@ -29,9 +29,9 @@ 
 FLOAT
 M_DECL_FUNC (__atanh) (FLOAT x)
 {
-  if (__glibc_unlikely (isgreaterequal (M_SUF (fabs) (x), M_LIT (1.0))))
+  if (__glibc_unlikely (isgreaterequal (M_FABS (x), M_LIT (1.0))))
     {
-      if (M_SUF (fabs) (x) == 1)
+      if (M_FABS (x) == 1)
 	/* Pole error: atanh(|x|==1).  */
 	__set_errno (ERANGE);
       else