fastlog: fast double precision natural logarithm function
— : double fastlog (double x)
Weak alias: log
C Prototype:
double fastlog (double x);
Inputs:
double x - the double precision input value.
Outputs:
The natural logarithm (base e) of x.
Fortran Function Interface:
DOUBLE PRECISION FASTLOG(X)
Inputs:
DOUBLE PRECISION X - the double precision input value.
Return Value:
The natural logarithm (base e) of X.
Notes:
fastlog computes the double precision natural logarithm of its argument x.
This is a relaxed
version of log, suitable for use with fastmath compiler flags or applications
not requiring full error handling. Denormal inputs may produce unpredictable
results. Error inputs produce C99 return values. The routine is accurate to
better than 1 ulp over the valid input range.
Special case return values:
Input
Output
+/- 0
-infinity
negative
QNaN
QNaN
same QNaN
SNaN
same NaN converted to QNaN
+infinity
+infinity
-infinity
QNaN
Performance:
97 cycles for most valid inputs.
86 cycles for .97 < x < 1.03