unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (SunOS-4.1.3)
Page:
Section:
Apropos / Subsearch:
optional field

IEEE_TEST(3M)                                                    IEEE_TEST(3M)



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

SYNOPSIS
       #include <&lt;math.h>&gt;

       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 for
       details.

       logb(x) returns the unbiased exponent of x  in  floating-point  format,
       for exercising the logb(L) test vector.  logb(+-) = +; logb(0) = - with
       a division by zero exception.  logb(x) differs from ilogb(x) in return-
       ing 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 multiplica-
       tion, for exercising the scalb(S) test vector.  Thus
              0 <&lt;= scalb(fabs(x),-logb(x)) <&lt; 2
       for every x except 0, infinity 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  for-
       mat.

       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)



                                21 January 1988                  IEEE_TEST(3M)