beautypg.com

Fmod, Free, Fmod free – Zilog EZ80F916 User Manual

Page 361

background image

UM014423-0607

C Standard Library

ZiLOG Developer Studio II

eZ80Acclaim!

®

User Manual

341

Example

double y=6.23;
double x;
x=floor(y);

fmod

Computes the floating-point remainder of

x

/

y

. If the quotient of

x

/

y

cannot be represented,

the behavior is undefined.

Synopsis

#include
double fmod(double x, double y);

Returns

The value of x if y is zero. Otherwise, it returns the value f, which has the same sign as x,
such that x – i * y = f for some integer i, where the magnitude of f is less than the magni-
tude of y.

Example

double y=7.23;
double x=2.31;
double z;
z=fmod(y,x);

free

Causes the space pointed to by ptr to be deallocated, that is, made available for further
allocation. If ptr is a null pointer, no action occurs. Otherwise, if the argument does not
match a pointer earlier returned by the

calloc

,

malloc

, or

realloc

function, or if the

space has been deallocated by a call to

free

or

realloc

, the behavior is undefined. If

freed space is referenced, the behavior is undefined.

Synopsis

#include
void free(void *ptr);

Example

char *buf;
buf=(char*) calloc(40, sizeof(char));
free(buf);

This manual is related to the following products: