Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzabolcs Nagy <szabolcs.nagy@arm.com>2018-09-18 16:14:53 +0300
committerJeff Johnston <jjohnstn@redhat.com>2018-09-18 21:12:18 +0300
commit877a386d763f5068eafce6ef851002547b462edb (patch)
treedc680ed2a63b3de77ddaba38381e2436de71138b /newlib/libm
parente3ddbeb84c36e3bf6aec7a70be9c2ed8ad6ef9bd (diff)
Fix the documentation comment of checkint
checkint in pow is not supposed to be used with 0, inf or nan inputs.
Diffstat (limited to 'newlib/libm')
-rw-r--r--newlib/libm/common/pow.c3
-rw-r--r--newlib/libm/common/sf_pow.c3
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)
{