Manual Page Result
0
Command: csqrt | Section: 3 | Source: OpenBSD | File: csqrt.3
CSQRT(3) FreeBSD Library Functions Manual CSQRT(3)
NAME
csqrt, csqrtf, csqrtl - complex square root
SYNOPSIS
#include <complex.h>
double complex
csqrt(double complex z);
float complex
csqrtf(float complex z);
long double complex
csqrtl(long double complex z);
DESCRIPTION
The csqrt(), csqrtf() and csqrtl() functions compute the complex square
root of z.
If z = x + iy, then
Re csqrt(z) = [ (|z| + x) / 2 ]^(1/2).
Im csqrt(z) = [ (|z| - x) / 2 ]^(1/2).
Note that -csqrt(z) is also a square root of z. The root chosen is
always in the right half plane and Im csqrt(z) has the same sign as y.
RETURN VALUES
The csqrt(), csqrtf() and csqrtl() functions return the complex square
root of z.
SEE ALSO
cpow(3)
STANDARDS
The csqrt(), csqrtf() and csqrtl() functions conform to ISO/IEC 9899:1999
("ISO C99").
FreeBSD 14.1-RELEASE-p8 June 5, 2013 FreeBSD 14.1-RELEASE-p8