Guardian Native C Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
Guardian Native C Library Calls (j - m) log2f(3)
NAME
log2f - Computes the base-2 logarithm function for a float value
LIBRARY
H-series and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCREDLL
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zcredll
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ycredll
SYNOPSIS
#include <math.h>
float log2f(
float x);
PARAMETERS
x Specifies a float value.
DESCRIPTION
The log2f() function is a float version of the log2() function; it takes a float argument and returns
a float result.
The log2f() function computes the base-2 logarithm of x.
NOTES
This function is implemented only for the IEEE_float floating-point option. Applications using
this function cannot be compiled if the specified floating-point option is Tandem_float.
RETURN VALUES
Upon successful completion, the log2f() function returns the base-2 logarithm of x.
If the value of x is positive or negative zero, the log2f() function returns HUGE_VALF and sets
errno to [ERANGE].
If the value of x is positive infinity, x is returned. If the value of x is 1, positive zero is returned.
If x is a finite value less than 0 or negative infinity, the log2f() function returns NaN and sets
errno to [EDOM].
If the value of x is NaN, NaN is returned.
ERRORS
If any of the following conditions occurs, the log2f() function sets errno to the corresponding
value:
[EDOM] The value of x is a finite value less than 0 or negative infinity.
[ERANGE] The value of x is zero.
RELATED INFORMATION
Functions: exp(3), exp10(3), log(3), log1p(3), log2(3), log2l(3), pow(3).
Files: math(4).
STANDARDS CONFORMANCE
This function conforms to the ISO/IEC 9899:1999 standard.
This function conforms to the IEEE Std 1003.1, 2004 Edition.
527192-018 Hewlett-Packard Company 4−55