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:
authorJeff Johnston <jjohnstn@redhat.com>2007-10-18 04:03:32 +0400
committerJeff Johnston <jjohnstn@redhat.com>2007-10-18 04:03:32 +0400
commit70317d8506a653b643a52e741442f506f23b24e4 (patch)
tree325d2d7106ff0ff058e4de57e25834e8683190e0 /newlib/libm/math
parent923f9573a3f8e607b264575448ca520b3f228863 (diff)
2007-10-17 Jeff Johnston <jjohnstn@redhat.com>
* libm/mathfp/s_logarithm.c: Fix error introduced by previous fix when handling negative input values. Make function consistent with math directory and glibc version such that inf and nan values return inf and nan respectively with no errno setting. * libm/mathfp/sf_logarithm.c: Ditto. * libm/math/w_log.c: Set errno to ERANGE when input is 0.0. * libm/math/wf_log.c: Ditto. * libm/math/w_log10.c: Ditto. * libm/math/wf_log10.c: Ditto.
Diffstat (limited to 'newlib/libm/math')
-rw-r--r--newlib/libm/math/w_log.c2
-rw-r--r--newlib/libm/math/w_log10.c2
-rw-r--r--newlib/libm/math/wf_log.c2
-rw-r--r--newlib/libm/math/wf_log10.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/newlib/libm/math/w_log.c b/newlib/libm/math/w_log.c
index e23efd7e6..38896cd25 100644
--- a/newlib/libm/math/w_log.c
+++ b/newlib/libm/math/w_log.c
@@ -95,7 +95,7 @@ PORTABILITY
if (_LIB_VERSION == _POSIX_)
errno = ERANGE;
else if (!matherr(&exc)) {
- errno = EDOM;
+ errno = ERANGE;
}
} else {
/* log(x<0) */
diff --git a/newlib/libm/math/w_log10.c b/newlib/libm/math/w_log10.c
index 7c3966954..66f0e78d1 100644
--- a/newlib/libm/math/w_log10.c
+++ b/newlib/libm/math/w_log10.c
@@ -93,7 +93,7 @@ PORTABILITY
if (_LIB_VERSION == _POSIX_)
errno = ERANGE;
else if (!matherr(&exc)) {
- errno = EDOM;
+ errno = ERANGE;
}
} else {
/* log10(x<0) */
diff --git a/newlib/libm/math/wf_log.c b/newlib/libm/math/wf_log.c
index 369ef3261..989eeb335 100644
--- a/newlib/libm/math/wf_log.c
+++ b/newlib/libm/math/wf_log.c
@@ -53,7 +53,7 @@
if (_LIB_VERSION == _POSIX_)
errno = ERANGE;
else if (!matherr(&exc)) {
- errno = EDOM;
+ errno = ERANGE;
}
} else {
/* logf(x<0) */
diff --git a/newlib/libm/math/wf_log10.c b/newlib/libm/math/wf_log10.c
index 728913500..41dd93a7b 100644
--- a/newlib/libm/math/wf_log10.c
+++ b/newlib/libm/math/wf_log10.c
@@ -54,7 +54,7 @@
if (_LIB_VERSION == _POSIX_)
errno = ERANGE;
else if (!matherr(&exc)) {
- errno = EDOM;
+ errno = ERANGE;
}
} else {
/* log10f(x<0) */