Everything

sqrt / sqrtf / sqrtl


Calculates the positive square root of a floating-point number.

[Format]

#include <math.h>

double sqrt (double d);

float sqrtf (float d);

long double sqrtl (long double d);

[Parameters]

d Floating-point number for which positive square root is to be computed

[Return values]

Normal: Positive square root of d

Abnormal: Domain error: Returns not-a-number.

[Remarks]

A domain error occurs if d is negative.