up | Inhaltsverzeichniss | Kommentar

Manual page for IEEE_TEST(3M)

ieee_test, logb, scalb, significant - IEEE test functions for verifying standard compliance

SYNOPSIS

#include <math.h>

double logb(x) double x;

double scalb(x,y) double x; double y;

double significant(x) double x;

DESCRIPTION

These functions allow users to verify compliance to ANSI/IEEE Std 754-1985 by running certain test vectors distributed by the University of California. Their use is not otherwise recommended; instead use scalbn(x,n) and ilogb(x) described in ieee_functions.3m See the [a manual with the abbreviation FPOINT] for details.

logb(x) returns the unbiased exponent of x in floating-point format, for exercising the logb(L) test vector. logb(±\(if) = +\(if; logb(0) = -\(if with a division by zero exception. logb(x) differs from ilogb(x) in returning a result in floating-point rather than integer format, in sometimes signaling IEEE exceptions, and in not normalizing subnormal x.

scalb(x,(double)n) returns x * 2**n computed by exponent manipulation rather than by actually performing an exponentiation or a multiplication, for exercising the scalb(S) test vector. Thus

0 <= scalb(fabs(x),-logb(x)) < 2
for every x except 0, \(if and NaN. scalb(x,y) is not defined when y is not an integral value. scalb(x,y) differs from scalbn(x,n) in that the second argument is in floating-point rather than integer format.

significant(x) computes just

scalb(x, (double) -ilogb(x)),
for exercising the fraction-part(F) test vector.

FILES

/usr/lib/libm.a

SEE ALSO

floatingpoint.3 ieee_values.3m ieee_functions.3m matherr.3m


index | Inhaltsverzeichniss | Kommentar

Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97