 | Cx51 User's Guide |  |
|
|
| sqrt517| Summary |
#include <80c517.h>
float sqrt517 (
float x); /* value to calculate square root of */
| | Description | The sqrt517 function calculates the square root of x. 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 sqrt517 function returns the positive square root of x. - If x < 0 sqrt517 returns NaN.
| | See Also | pow, sqrt | | Example |
#include <math.h>
#include <80c517.h> /* for printf */
void tst_sqrt517 (void) {
float x;
float y;
x = 25.0;
y = sqrt517 (x); /* y = 5 */
printf ("SQRT517(%f) = %f\n", x, y);
}
|
|
|