
UM017105-0511 Standard Functions
Zilog Developer Studio II – ZNEO™
User Manual
409
Example
double y=.1234;
double x;
x = asin(y);
assert
Puts diagnostics into programs. When it is executed, if expression is false (that is, eval-
uates to zero), the
assert macro writes information about the particular call that failed
(including the text of the argument, the name of the source file, and the source line num-
ber—the latter are respectively the values of the preprocessing macros
__FILE__ and
__LINE__) on the serial port using the printf() function. It then loops forever.
Synopsis
#include <assert.h>
void assert(int expression);
Returns
If expression is true (that is, evaluates to nonzero), the assert macro returns no value.
Example
#include <assert.h>
char str[] = "COMPASS";
void main(void)
{
assert(str[0] == 'B');
}
atan, atanf
Computes the principal value of the arc tangent of x.
Synopsis
#include <math.h>
double atan(double x);
float atanf(float x);
Returns
The arc tangent in the range (-pi/2, +pi/2).
Comentários a estes Manuais