Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ intro(3M) — OS/MP 4.1A

Media Vault

Software Library

Restoration Projects

Artifacts Sought

INTRO(3M)  —  MATHEMATICAL LIBRARY

NAME

intro − introduction to mathematical library functions and constants

SYNOPSIS

#include <sys/ieeefp.h>

#include <floatingpoint.h>

#include <math.h>

DESCRIPTION

The include file <math.h> contains declarations of all the functions described in Section 3M that are implemented in the math library, libm.  C programs should be linked with the −lm option in order to use this library. 

<sys/ieeefp.h> and <floatingpoint.h> define certain types and constants used for libm exception handling, conforming to ANSI/IEEE Std 754-1985, the IEEE Standard for Binary Floating-Point Arithmetic.

ACKNOWLEDGEMENT

The Solbourne version of libm is based upon and developed from ideas embodied and codes contained in 4.3 BSD, which may not be compatible with earlier BSD or UNIX implementations. 

IEEE ENVIRONMENT

The IEEE Standard specifies modes for rounding direction, precision, and exception trapping, and status reflecting accrued exceptions.  These modes and status constitute the IEEE run-time environment. 

IEEE EXCEPTION HANDLING

The IEEE Standard specifies exception handling for aint, ceil, floor, irint, remainder, rint, and sqrt, and suggests appropriate exception handling for fp_class, copysign, fabs, finite, fmod, isinf, isnan, ilogb, ldexp, logb, nextafter, scalb, scalbn and signbit, but does not specify exception handling for the other libm functions. 

For these other unspecified functions the spirit of the IEEE Standard is generally followed in libm by handling invalid operand, singularity (division by zero), overflow, and underflow exceptions, as much as possible, in the same way they are handled for the fundamental floating-point operations such as addition and multiplication. 

These unspecified functions are usually not quite correctly rounded, may not observe the optional rounding directions, and may not set the inexact exception correctly. 

SYSTEM V EXCEPTION HANDLING

The System V Interface Definition ( SVID ) specifies exception handling for some libm functions: j0(), j1(), jn(), y0(), y1(), yn(), exp(), log(), log10(), pow(), sqrt(), hypot(), lgamma(), sinh(), cosh(), sin(), cos(), tan(), asin(), acos(), and atan2().  See matherr(3M) for a discussion of the extent to which Solbourne’s implementation of libm follows the SVID when it is consistent with the IEEE Standard and with hardware efficiency. 

LIST OF MATH LIBRARY FUNCTIONS

NameAppears on PageDescription
−bessel(3M) Bessel functions
−frexp(3M) floating-point analysis
−hyperbolic(3M) hyperbolic functions
−ieee_functions(3M) IEEE classification
−ieee_test(3M) IEEE tests for compliance
−ieee_values(3M) returns double-precision IEEE infinity
−trig(3M) trigonometric functions
acostrig(3M) trigonometric functions
acoshhyperbolic(3M) hyperbolic functions
aintrint(3M) round to integral value in floating-point or integer format
anintrint(3M) round to integral value in floating-point or integer format
annuityexp(3M) exponential, logarithm, power
asintrig(3M) trigonometric functions
asinhhyperbolic(3M) hyperbolic functions
atantrig(3M) trigonometric functions
atan2trig(3M) trigonometric functions
atanhhyperbolic(3M) hyperbolic functions
cbrtsqrt(3M) cube root, square root
ceilrint(3M) round to integral value in floating-point or integer format
compoundexp(3M) exponential, logarithm, power
copysignieee_functions(3M)miscellaneous functions for IEEE arithmetic
costrig(3M) trigonometric functions
coshhyperbolic(3M) hyperbolic functions
erferf(3M) error functions
erfcerf(3M) error functions
expexp(3M) exponential, logarithm, power
exp2exp(3M) exponential, logarithm, power
exp10exp(3M) exponential, logarithm, power
expm1exp(3M) exponential, logarithm, power
fabsieee_functions(3M) miscellaneous functions for IEEE arithmetic
finiteieee_functions(3M) miscellaneous functions for IEEE arithmetic
floorrint(3M) round to integral value in floating-point or integer format
fmodieee_functions(3M) miscellaneous functions for IEEE arithmetic
fp_classieee_functions(3M) miscellaneous functions for IEEE arithmetic
frexpfrexp(3M) traditional UNIX functions
HUGEieee_values(3M) functions that return extreme values of IEEE arithmetic
HUGE_VALieee_values(3M) functions that return extreme values of IEEE arithmetic
hypothypot(3M) Euclidean distance
ieee_flagsieee_flags(3M) mode and status function for IEEE standard arithmetic
ieee_functionsieee_functions(3M) miscellaneous functions for IEEE arithmetic
ieee_handlerieee_handler(3M) IEEE exception trap handler function
ieee_testieee_test(3M) IEEE test functions for verifying standard compliance
ieee_valuesieee_values(3M) functions that return extreme values of IEEE arithmetic
ilogbieee_functions(3M) miscellaneous functions for IEEE arithmetic
infinityieee_values(3M) functions that return extreme values of IEEE arithmetic
irintrint(3M) round to integral value in floating-point or integer format
isinfieee_functions(3M) miscellaneous functions for IEEE arithmetic
isnanieee_functions(3M) miscellaneous functions for IEEE arithmetic
isnormalieee_functions(3M) miscellaneous functions for IEEE arithmetic
issubnormalieee_functions(3M) miscellaneous functions for IEEE arithmetic
iszeroieee_functions(3M) miscellaneous functions for IEEE arithmetic
j0bessel(3M) Bessel functions
j1bessel(3M) Bessel functions
jnbessel(3M) Bessel functions
ldexpfrexp(3M) traditional UNIX functions
lgammalgamma(3M) log gamma function
logexp(3M) exponential, logarithm, power
log2exp(3M) exponential, logarithm, power
log10exp(3M) exponential, logarithm, power
log1pexp(3M) exponential, logarithm, power
logbieee_test(3M) IEEE test functions for verifying standard compliance
matherrmatherr(3M) math library exception-handling function
max_normalieee_values(3M) functions that return extreme values of IEEE arithmetic
max_subnormalieee_values(3M) functions that return extreme values of IEEE arithmetic
min_normalieee_values(3M) functions that return extreme values of IEEE arithmetic
min_subnormalieee_values(3M) functions that return extreme values of IEEE arithmetic
modffrexp(3M) traditional UNIX functions
nextafterieee_functions(3M) miscellaneous functions for IEEE arithmetic
nintrint(3M) round to integral value in floating-point or integer format
powexp(3M) exponential, logarithm, power
quiet_nanieee_values(3M) functions that return extreme values of IEEE arithmetic
remainderieee_functions(3M) miscellaneous functions for IEEE arithmetic
rintrint(3M) round to integral value in floating-point or integer format
scalbieee_test(3M) IEEE test functions for verifying standard compliance
scalbnieee_functions(3M) miscellaneous functions for IEEE arithmetic
signaling_nanieee_values(3M) functions that return extreme values of IEEE arithmetic
signbitieee_functions(3M) miscellaneous functions for IEEE arithmetic
significantieee_test(3M) IEEE test functions for verifying standard compliance
sintrig(3M) trigonometric functions
single_precisionsingle_precision(3M)  single-precision access to libm functions
sinhhyperbolic(3M) hyperbolic functions
sqrtsqrt(3M) cube root, square root
tantrig(3M) trigonometric functions
tanhhyperbolic(3M) hyperbolic functions
y0bessel(3M) Bessel functions
y1bessel(3M) Bessel functions
ynbessel(3M) Bessel functions

Solbourne Computer, Inc.  —  20 January 1988

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