sqrt - Square Root

Prev Next

Function Names

sqrt

Description

Calculates the square root of a value

Call as: function

Restrictions

Indirect parameter passing is disabled

Parameter count

1

Parameters

No.TypeDescription
1
input
numeral Value

Value to use for logarithmic calculation

Return value

TypeDescription
numeral Result

Calculated square root value

Exceptions

Negative square root

Examples

      echo( sqrt( 4 ) );
      echo( sqrt( 2 ) );

Output

2
1.4142135624
Try it yourself: Open LIB_Function_sqrt.b4p in B4P_Examples.zip. Decompress before use.

See also

Power Functions