
ltoa
7-37
Run-Time-Support Functions
Natural Logarithm
log
Syntax
#include <math.h>
double
log
(double x);
Defined in
log.c in rts.src
Description
The log function returns the natural logarithm of a real number x. A domain er-
ror occurs if x is negative; a range error occurs if x is 0.
Example
float x, y;
x = 2.718282;
y = log(x);
/* Return value = 1.0 */
Common Logarithm
log10
Syntax
#include <math.h>
double
log10
(double x);
Defined in
log10.c in rts.src
Description
The log10 function returns the base-10 logarithm of a real number x. A domain
error occurs if x is negative; a range error occurs if x is 0.
Example
float x, y;
x = 10.0;
y = log(x);
/* Return value = 1.0 */
See setjmp/longjmp on page 7-45
longjump
Convert Long Integer to ASCII
ltoa
Syntax
#include <stdlib.h>
int
ltoa
(long val, char *buffer);
Defined in
ltoa.c in rts.src
Description
The ltoa function converts a long integer val to the equivalent ASCII string and
writes it into buffer. If the input number val is negative, a leading minus sign
is output. The ltoa function returns the number of characters placed in the
buffer.
Example
int i;
char s[10];
i =
ltoa
(−92993L, s); /* i = 6, s = ”−92993”*/
Содержание TMS320C2x
Страница 8: ...viii...
Страница 69: ...2 47 C Compiler Description...
Страница 159: ...6 36...
Страница 226: ...8 6...
Страница 250: ...Index Index 14 Z z shell option 2 2 2 4 2 14 overriding with c option 4 5 overriding with n option 2 13...