Guardian Native C Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

Guardian Native C Library Calls (j - m) logbf(3)
NAME
logbf - Computes the radix-independent exponent as a float number
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 logbf(
float x);
PARAMETERS
x Species the float value for which the exponent is to be calculated.
DESCRIPTION
The logbf() function is a float version of the logb() function; it takes a float argument and returns
a float result.
The logbf() function returns the unbiased exponent part of the floating-point value given as the x
parameter. The logbf() function calculates the integral part of the base-r logarithm (where r is
the radix of the machines floating-point arithmetic) of the absolute value of x and returns the
result as a signed floating-point value.
NOTES
The logbf() function can be called only by native processes.
This function supports both IEEE Std 754-1985 floating-point and Tandem floating-point values.
IEEE values can include NaN and infinity, and the sign of 0.0 (zero) can be either positive or
negative. Refer to the fp_class(3) reference page for a description of IEEE value classes.
Guardian functions are available to convert between floating-point formats. Refer to the Guar-
dian Programmer’s Guide for a discussion of floating-point conversions.
RETURN VALUES
The logbf() function returns the exponent of x.
For IEEE floating-point data, the following are true:
logbf(NaN) returns a quiet NaN.
When the value of x is positive or negative innity, logbf() returns a value of positive
infinity.
When the value of x is 0.0 (zero), logbf(0.0) returns a value of -HUGE_VALF and sets
errno to [EDOM].
For Tandem floating-point data, when x has a value of 0.0 (zero), logbf() returns the value
-HUGE_VALF and sets errno to [EDOM].
ERRORS
If any of the following conditions occurs, the logbf() function sets errno to the corresponding
value:
[EDOM] The x parameter is 0.0 (zero).
527192-018 Hewlett-Packard Company 461