| 1 |
'\" t |
| 2 |
.\" Copyright 2002, Walter Harms <[email protected]> |
| 3 |
.\" Copyright, the authors of the Linux man-pages project |
| 4 |
.\" |
| 5 |
.\" SPDX-License-Identifier: GPL-1.0-or-later |
| 6 |
.\" |
| 7 |
.TH csqrt 3 2026-02-08 "Linux man-pages 6.18" |
| 8 |
.SH NAME |
| 9 |
csqrt, csqrtf, csqrtl \- complex square root |
| 10 |
.SH LIBRARY |
| 11 |
Math library |
| 12 |
.RI ( libm ,\~ \-lm ) |
| 13 |
.SH SYNOPSIS |
| 14 |
.nf |
| 15 |
.B #include <complex.h> |
| 16 |
.P |
| 17 |
.BI "double complex csqrt(double complex " z ); |
| 18 |
.BI "float complex csqrtf(float complex " z ); |
| 19 |
.BI "long double complex csqrtl(long double complex " z ); |
| 20 |
.fi |
| 21 |
.SH DESCRIPTION |
| 22 |
These functions calculate the complex square root of |
| 23 |
.IR z , |
| 24 |
with a branch cut along the negative real axis. |
| 25 |
(That means that |
| 26 |
.I csqrt(\-1+eps*I) |
| 27 |
will be close to I while |
| 28 |
.I csqrt(\-1\-eps*I) |
| 29 |
will be close to \-I, |
| 30 |
.I if eps |
| 31 |
is a small positive real number.) |
| 32 |
.SH ATTRIBUTES |
| 33 |
For an explanation of the terms used in this section, see |
| 34 |
.BR attributes (7). |
| 35 |
.TS |
| 36 |
allbox; |
| 37 |
lbx lb lb |
| 38 |
l l l. |
| 39 |
Interface Attribute Value |
| 40 |
T{ |
| 41 |
.na |
| 42 |
.nh |
| 43 |
.BR csqrt (), |
| 44 |
.BR csqrtf (), |
| 45 |
.BR csqrtl () |
| 46 |
T} Thread safety MT-Safe |
| 47 |
.TE |
| 48 |
.SH STANDARDS |
| 49 |
C11, POSIX.1-2008. |
| 50 |
.SH HISTORY |
| 51 |
glibc 2.1. |
| 52 |
C99, POSIX.1-2001. |
| 53 |
.SH SEE ALSO |
| 54 |
.BR cabs (3), |
| 55 |
.BR cexp (3), |
| 56 |
.BR complex (7) |