std::sqrt

From Cppreference

Jump to: navigation, search
Defined in header <cmath>

float       sqrt( float arg );

double      sqrt( double arg );

long double sqrt( long double arg );

Computes square root of arg.

[edit] Parameters

arg - floating point value

[edit] Return value

square root of arg.

Domain error occurs if arg is negative. NAN is returned in that case.

[edit] See also

cbrt (C++11)
computes cubic root (3x)
(function)
pow
raises a number to the given power (xy)
(function)