Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

matherr(3M)

ieee_test(3M)

NAME

ieee_test, logb, scalb, significand − IEEE test functions for verifying standard compliance

SYNOPSIS

cc [ flag ... ] file ... −lm [ library ... ]

#include <math.h>

double logb(double x);

double scalb(double x, double y);

double significand(double x);

MT-LEVEL

MT-Safe

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. 

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 0 exception. 

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, ∞ and NaN.  scalb(x,y) is not defined when y is not an integral value. 

If x equals sig ∗ 2∗∗n with 1 ≤ sig < 2, then significand(x) returns sig for exercising the fraction-part(F) test vector.  significand(x) is not defined when x is either 0, ±∞ or NaN. 

RETURN VALUES

For exceptional cases, matherr(3M) tabulates the values to be returned as dictated by various Standards. 

SEE ALSO

matherr(3M)

SunOS 5.5/x86  —  Last change: 4 Mar 1994

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026