Fix the documentation comment of checkint

Message ID 49abb558-de29-5687-7cf8-c3576b752f11@arm.com
State Accepted
Commit 877a386d763f5068eafce6ef851002547b462edb
Headers show
Series
  • Fix the documentation comment of checkint
Related show

Commit Message

Szabolcs Nagy Sept. 18, 2018, 4:16 p.m.
Another comment fix to keep in sync with arm optimized-routines.

Comments

Jeff Johnston Sept. 18, 2018, 6:13 p.m. | #1
Patch applied.

-- Jeff J.

On Tue, Sep 18, 2018 at 12:16 PM, Szabolcs Nagy <szabolcs.nagy@arm.com>
wrote:

> Another comment fix to keep in sync with arm optimized-routines.

>

Patch

From e79f20af75a4faea5bd6040773409bec1364631d Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <szabolcs.nagy@arm.com>
Date: Tue, 18 Sep 2018 14:14:53 +0100
Subject: [PATCH] Fix the documentation comment of checkint

checkint in pow is not supposed to be used with 0, inf or nan inputs.
---
 newlib/libm/common/pow.c    | 3 ++-
 newlib/libm/common/sf_pow.c | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/newlib/libm/common/pow.c b/newlib/libm/common/pow.c
index e02817ec2..c27d0354a 100644
--- a/newlib/libm/common/pow.c
+++ b/newlib/libm/common/pow.c
@@ -268,7 +268,8 @@  exp_inline (double x, double xtail, uint32_t sign_bias)
   return scale + scale * tmp;
 }
 
-/* Returns 0 if not int, 1 if odd int, 2 if even int.  */
+/* Returns 0 if not int, 1 if odd int, 2 if even int.  The argument is
+   the bit representation of a non-zero finite floating-point value.  */
 static inline int
 checkint (uint64_t iy)
 {
diff --git a/newlib/libm/common/sf_pow.c b/newlib/libm/common/sf_pow.c
index 2aa91c9b8..fcdab0ebd 100644
--- a/newlib/libm/common/sf_pow.c
+++ b/newlib/libm/common/sf_pow.c
@@ -127,7 +127,8 @@  exp2_inline (double_t xd, uint32_t sign_bias)
   return y;
 }
 
-/* Returns 0 if not int, 1 if odd int, 2 if even int.  */
+/* Returns 0 if not int, 1 if odd int, 2 if even int.  The argument is
+   the bit representation of a non-zero finite floating-point value.  */
 static inline int
 checkint (uint32_t iy)
 {
-- 
2.14.1