sqrt()

Calculates the square root.

Synopsis

float sqrt(float x);

Parameters

Parameter Description
x value

Return value

In the event of errors 0.0.

If the argument is lying outside of the value range [0..], NaN (Not a Number) is returned.

Description

Returns the square root of x, for x >= 0.

Example

main()
{
  float f;
  f=pow(2, 8); // Natural 256
  f=sqrt(f); // Results in 16
  f=pow(27, 1/3); // OK = 3
}

Assignment

Mathematical function

Availability

CTRL