Square root

4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next

version 6.0


Square root (number) Number

ParameterTypeDescription
numberNumberNumber whose square root is calculated
Function resultNumberSquare root of the number

Description

Square root returns the square root of number.

Examples

1. The line:

   $vrSquareRootOfTwo := Square root (2)

assigns the value 1.414213562373 to the variable $vrSquareRootOfTwo.


2. The following method returns the hypotenuse of the right triangle whose two legs are passed as parameters:

      ` Hypotenuse method
      ` Hypotenuse ( real ; real ) -> real
      ` Hypotenuse ( legA ; legB ) -> Hypotenuse
   C_REAL($0;$1;$2)
   $0:= Square root(($1^2)+($2^2))

For instance,

Hypotenuse (4;3)
returns 5.

See Also

Numeric Operators.


4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next