fastlogf: fast single precision natural logarithm function
— : float fastlogf (float x)
Weak alias: logf
C Prototype:
float fastlogf (float x);
Inputs:
float x - the single precision input value.
Outputs:
The natural logarithm (base e) of x.
Fortran Function Interface:
REAL FASTLOGF(X)
Inputs:
REAL X - the single precision input value.
Return Value:
The natural logarithm (base e) of X.
Notes:
fastlogf computes the single precision natural logarithm of its argument x.
This is a relaxed
version of logf, 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:
94 cycles for most valid inputs.
85 cycles for .97 < x < 1.03