|
| atof517| Summary | |
#include <80c517.h>
float atof517 (
void *string); /* string to convert */
| | Description | | The atof517 function converts string into a floating-point value. The input string must be a sequence of characters that can be interpreted as a floating-point number. This function stops processing characters from string at the first one it cannot recognize as part of the number. The string passed to atof517 must have the following format:
« {+|-} » digits . digits « {e|E} « {+|-} » digits »
Where digits | May be one or more decimal digits. |
Note - This routine uses the arithmetic unit of the Infineon C517x/C509 to provide accelerated execution speed. Do not use this routine with a CPU that does not support this feature.
| | Return Value | | The atof517 function returns the floating-point value that is produced by interpreting the characters in string as a number. | | See Also | | atof, atoi, atol, strtod, strtod517, strtol, strtoul | | Example | |
#include <80c517.h>
#include <stdio.h> /* for printf */
void tst_atof (void) {
float f;
char s [] = "1.23";
f = atof517 (s);
printf ("ATOF517(%s) = %f\n", s, f);
}
|
|
|