diff --git a/library/math_log.c b/library/math_log.c index 47a80f6..98d633c 100644 --- a/library/math_log.c +++ b/library/math_log.c @@ -1,5 +1,5 @@ /* - * $Id: math_log.c,v 1.3 2005-01-02 09:07:07 obarthel Exp $ + * $Id: math_log.c,v 1.4 2005-01-18 20:00:08 obarthel Exp $ * * :ts=4 * @@ -244,11 +244,10 @@ log(double x) { double result; - /* ZZZ when do we consider 'x' to be invalid? If it's close - * enough to zero or negative. How large is epsilon, and how - * do we return minus infinity? + /* When do we consider 'x' to be invalid? If it's close + * enough to zero or negative. */ - if(x > 0.0) + if(x > DBL_EPSILON) { result = __log(x); } diff --git a/library/math_log10.c b/library/math_log10.c index 0093bc3..532db47 100644 --- a/library/math_log10.c +++ b/library/math_log10.c @@ -1,5 +1,5 @@ /* - * $Id: math_log10.c,v 1.2 2005-01-02 09:07:07 obarthel Exp $ + * $Id: math_log10.c,v 1.3 2005-01-18 20:00:08 obarthel Exp $ * * :ts=4 * @@ -186,11 +186,10 @@ log10(double x) { double result; - /* ZZZ when do we consider 'x' to be invalid? If it's close - * enough to zero or negative. How large is epsilon, and how - * do we return minus infinity? + /* When do we consider 'x' to be invalid? If it's close + * enough to zero or negative. */ - if(x > 0.0) + if(x > DBL_EPSILON) { result = __log10(x); }