AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox AT&T UNIX™PC Unix System V Users Manual - tenox

01.01.2013 Views

· '-... _ _ / . f) · (� "-- ·

EXP ( 3M ) EXP ( 3M ) NAME exp, log, loglO, pow, sqrt - exponential, logarithm, power, square root functions SYNOPSIS #include double exp (x) double x; double log (x) double x; double loglO (x) double x; double pow (x, y) double x, y; double sqrt (x) double x; DESCRIPTION Exp returns ex 0 Log returns the natural logarithm of x. The value of x must be positive. Logl 0 returns the logarithm base ten of x. The value of x must be positive. Pow returns xY 0 The values of x and y may not both be zero. If x is non-positive, y must be an integer. Sqrt returns the square root of x. The value of x may not be negative. DIAGNOSTICS Exp returns HUGE when the correct value would overflow, and sets errno to ERANGE. Log and loglO return 0 and set errno to EDOM when x is nonpositive. An error message is printed on the standard error output. Pow returns 0 and sets errno to EDOM when x is non-positive and y is not an integer, or when x and y are both zero. In these cases a message indicating DOMAIN error is printed on the standard error output. When the correct value for pow would overflow, pow returns HUGE 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 hypot(3M), matherr(3M), sinh(3M). - 1 -

EXP ( 3M ) EXP ( 3M )<br />

NAME<br />

exp, log, loglO, pow, sqrt - exponential, logarithm, power, square<br />

root functions<br />

SYNOPSIS<br />

#include <br />

double exp (x)<br />

double x;<br />

double log (x)<br />

double x;<br />

double loglO (x)<br />

double x;<br />

double pow (x, y)<br />

double x, y;<br />

double sqrt (x)<br />

double x;<br />

DESCRIPTION<br />

Exp returns ex 0<br />

Log returns the natural logarithm of x. The value of x must be<br />

positive.<br />

Logl 0 returns the logarithm base ten of x. The value of x must<br />

be positive.<br />

Pow returns xY 0 The values of x and y may not both be zero. If<br />

x is non-positive, y must be an integer.<br />

Sqrt returns the square root of x. The value of x may not be<br />

negative.<br />

DIAGNOSTICS<br />

Exp returns HUGE when the correct value would overflow, and<br />

sets errno to ERANGE.<br />

Log and loglO return 0 and set errno to EDOM when x is nonpositive.<br />

An error message is printed on the standard error output.<br />

Pow returns 0 and sets errno to EDOM when x is non-positive<br />

and y is not an integer, or when x and y are both zero. In these<br />

cases a message indicating DOMAIN error is printed on the standard<br />

error output. When the correct value for pow would<br />

overflow, pow returns HUGE and sets errno to ERANGE.<br />

Sqrt returns 0 and sets errno to EDOM when x is negative. A<br />

message indicating DOMAIN error is printed on the standard error<br />

output.<br />

These error-handling procedures may be changed with the function<br />

matherr(3M).<br />

SEE ALSO<br />

hypot(3M), matherr(3M), sinh(3M).<br />

- 1 -

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!