summaryrefslogtreecommitdiff
path: root/src/math/log10l.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/math/log10l.c')
-rw-r--r--src/math/log10l.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/math/log10l.c b/src/math/log10l.c
index f0eeeafb..c7aacf90 100644
--- a/src/math/log10l.c
+++ b/src/math/log10l.c
@@ -117,16 +117,15 @@ static const long double S[4] = {
long double log10l(long double x)
{
- long double y;
- volatile long double z;
+ long double y, z;
int e;
if (isnan(x))
return x;
if(x <= 0.0) {
if(x == 0.0)
- return -1.0 / (x - x);
- return (x - x) / (x - x);
+ return -1.0 / (x*x);
+ return (x - x) / 0.0;
}
if (x == INFINITY)
return INFINITY;