beautypg.com

Ceil, Ceil cos – Zilog Z8F0130 User Manual

Page 460

background image

Appendix B. C Standard Library

UM013037-1212

436

Zilog Developer Studio II – Z8 Encore!
User Manual

Returns

A pointer to the start (lowest byte address) of the allocated space. If the space cannot be
allocated, or if nmemb or

size

is zero, the

calloc

function returns a null pointer.

Example

char *buf;

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

if (buf != NULL)

/*success*/

else

/*fail*/

ceil

Computes the smallest integer not less than x.

Synopsis

#include

double ceil(double x);

Returns

The smallest integer not less than x, expressed as a

double

.

Example

double y=1.45;

double x;

x=ceil(y);

cos

Computes the cosine of x (measured in radians). A large magnitude argument can yield a
result with little or no significance.

Synopsis

#include

double cos(double x);

Returns

The cosine value.