|
This function returns the result of the square root function. |
||||||
Syntax: |
|||||||
{INT_VAR|FLO_VAR}= sqrt({NUM_EXPR}) | |||||||
I/O parameters:
|
|||||||
Return value: |
|||||||
|
|||||||
Example: |
|||||||
Declaration of Variables | |||||||
10 ask(DOCU_FLOAT_1,"Please enter a value!") 20 DOCU_FLOAT_2 = sqrt(DOCU_FLOAT_1) 30 DOCU_STRING_1 = strprint("The square root of %f is equal to %f", DOCU_FLOAT_1,DOCU_FLOAT_2") 40 put(DOCU_STRING_1) |
|||||||
Result: | |||||||
![]() |
|||||||
![]() |
In order to prevent errors, the float/double type must be used if results can be expected to be either very large or very small (<2^-31 or > 2^31). | ||||||
![]() |
Functions and commands: Mathematics |