iDevOS CALC "SQRT" Command
Get the non-negative square root of a value.
Description
CALC( y, a, "SQRT" ); // y = sqrt(a) = non-negative square root of a
This command returns the value y which is the non-negative square root of a.
Parameters
y- Calculation result.
Parameter type: entity name of a numeric variable (egU8,S32,FLT3etc). a- Input value.
Parameter type: immediate number, or entity name of a numeric variable (egU8,S32,FLT3etc). "SQRT"- CALC command operator.
Parameter type: immediate string.
Examples
Example 1
VAR(d, 0.0, FLT4); VAR(a1, 327.6, FLT4); VAR(a2, 64, S32); CALC(d, a1, "SQRT"); // d = 18.0997 CALC(d, a2, "SQRT"); // d = 8.0000

