beautypg.com

Fabs, Exp fabs – Zilog Z8F0130 User Manual

Page 462

background image

Appendix B. C Standard Library

UM013037-1212

438

Zilog Developer Studio II – Z8 Encore!
User Manual

div_t t;

int q;

int r;

t=div (x,y);

q=t.quot;

r=t.rem;

exp

Computes the exponential function of

x

. A range error occurs if the magnitude of

x

is too

large.

Synopsis

#include

double exp(double x);

Returns

The exponential value.

Example

double y=.1234;

double x;

x=exp(y)

fabs

Computes the absolute value of a floating-point number

x

.

Synopsis

#include

double fabs(double x);

Returns

The absolute value of x.

Example

double y=6.23;

double x;

x=fabs(y);