beautypg.com

Ldiv, Log, logf, Ldiv log, logf – Zilog ZUSBOPTS User Manual

Page 452: Example, Synopsis, Returns

background image

Standard Functions

UM017105-0511

424

Zilog Developer Studio II – ZNEO™
User Manual

Example

double x=1.235

int exp=2;

double y;

y=ldexp(x,exp);

ldiv

Computes the quotient and remainder of the division of the numerator

numer

by the

denominator

denom

. If the division is inexact, the sign of the quotient is that of the

mathematical quotient, and the magnitude of the quotient is the largest integer less than
the magnitude of the mathematical quotient.

Synopsis

#include

ldiv_t ldiv(long numer, long denom);

Example

long x=25000;

long y=300;

ldiv_t t;

long q;

long r;

t=ldiv(x,y);

q=t.quot;

r=t.rem;

log, logf

Computes the natural logarithm of x. A domain error occurs if the argument is negative. A
range error occurs if the argument is zero.

Synopsis

#include

double log(double x);

float logf(float x);

Returns

The natural logarithm.

This manual is related to the following products: