Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ log(3M) — A/UX 3.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

intro(2)

hypot(3M)

matherr(3M)

sinh(3M)




exp(3M) exp(3M)
NAME exp, log, log10, pow, sqrt - provide exponential, logarithm, power, and square root functions SYNOPSIS #include <math.h> double exp(x) double x; double log(x) double x; double log10(x) double x; double pow(x, y) double x, y; double sqrt(x) double x; DESCRIPTION The exp function returns e raised to the power of x. log returns the natural logarithm of x. The value of x must be positive. log10 returns the logarithm base ten of x. The value of x must be positive. The pow function returns x raised to the power of y. If x is zero, y must be positive. If x is negative, y must be an integer. sqrt returns the nonnegative square root of x. The value of x may not be negative. STATUS MESSAGES AND VALUES The exp program returns HUGE when the correct value would overflow, or 0 when the correct value would underflow, and sets errno to ERANGE. log and log10 return -HUGE and set errno to EDOM when x is nonpositive. A message indicating DOMAIN error (or SING error when x is 0) is printed on the standard error output. pow returns 0 and sets errno to EDOM when x is 0 and y is nonpositive, or when x is negative and y is not an integer. In these cases a message indicating DOMAIN error is printed on the standard error output. When the correct value for pow would overflow or underflow, pow returns +HUGE or 0 January 1992 1



exp(3M) exp(3M)
respectively, and sets errno to ERANGE. sqrt returns 0 and sets errno to EDOM when x is negative. A message indicating DOMAIN error is printed on the standard error output. These error-handling procedures may be changed with the function matherr(3M). SEE ALSO intro(2), hypot(3M), matherr(3M), sinh(3M) 2 January 1992

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