beautypg.com

Exp, expf, Synopsis, Returns – Zilog ZUSBOPTS User Manual

Page 443: Example

background image

UM017105-0511

Standard Functions

Zilog Developer Studio II – ZNEO™

User Manual

415

matical quotient, and the magnitude of the quotient is the largest integer less than the mag-
nitude of the mathematical quotient.

Synopsis

#include

div_t div(int numer, int denom);

Returns

A structure of type div_t, comprising both the quotient and the remainder. The structure
contains the following members, in either order:

int quot;

/* quotient */

int rem;

/* remainder */

Example

int x=25;

int y=3;

div_t t;

int q;

int r;

t=div (x,y);

q=t.quot;

r=t.rem;

exp, expf

Computes the exponential function of

x

. A range error occurs if the magnitude of

x

is too

large.

Synopsis

#include

double exp(double x);

float expf(float x);

Returns

The exponential value.

Example

double y=.1234;

double x;

x=exp(y);

This manual is related to the following products: