beautypg.com

Free, Frexp, frexpf, Free frexp, frexpf – Zilog ZUSBOPTS User Manual

Page 445: Synopsis, Returns, Example

background image

UM017105-0511

Standard Functions

Zilog Developer Studio II – ZNEO™

User Manual

417

Synopsis

#include

double fmod(double x, double y);

float fmodf(float x, float 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);

frexp, frexpf

Breaks a floating-point number into a normalized fraction and an integral power of 2. It
stores the integer in the

int

object pointed to by

exp

.

This manual is related to the following products: