Atan2, Atof, Atan2 atof – Zilog EZ80F916 User Manual
Page 355

UM014423-0607
C Standard Library
ZiLOG Developer Studio II
eZ80Acclaim!
®
User Manual
335
Example
double y=.1234;
double x;
x=atan(y);
atan2
Computes the principal value of the arc tangent of y/x, using the signs of both arguments
to determine the quadrant of the return value. A domain error occurs if both arguments are
zero.
Synopsis
#include
double atan2(double y, double x);
Returns
The arc tangent of y/x, in the range [–pi, +pi].
Example
double y=.1234;
double x=.4321;
double z;
z=atan2(y,x);
atof
Converts the string pointed to by nptr to double representation. Except for the behavior on
error,
atof
is equivalent to
strtod (nptr, (char **)NULL)
.
Synopsis
#include
double atof(char *nptr);
Returns
The converted value.
Example
char str []="1.234";
double x;
x= atof(str);