mirror of
https://gitlab.com/rnger/amath
synced 2025-10-05 18:39:41 +00:00
72 lines
1.3 KiB
Groff
72 lines
1.3 KiB
Groff
.TH "lib/cplex/cacos.c" 3 "Tue Jan 24 2017" "Version 1.6.2" "amath" \" -*- nroff -*-
|
|
.ad l
|
|
.nh
|
|
.SH NAME
|
|
lib/cplex/cacos.c \-
|
|
.SH SYNOPSIS
|
|
.br
|
|
.PP
|
|
\fC#include 'prim\&.h'\fP
|
|
.br
|
|
\fC#include 'math\&.h'\fP
|
|
.br
|
|
\fC#include 'complex\&.h'\fP
|
|
.br
|
|
|
|
.SS "Functions"
|
|
|
|
.in +1c
|
|
.ti -1c
|
|
.RI "\fBcomplex\fP \fBcacos\fP (\fBcomplex\fP z)"
|
|
.br
|
|
.RI "\fIInverse cosine of complex number\&. \fP"
|
|
.in -1c
|
|
.SH "Function Documentation"
|
|
.PP
|
|
.SS "\fBcomplex\fP cacos (\fBcomplex\fP z)"
|
|
|
|
.PP
|
|
Inverse cosine of complex number\&.
|
|
.PP
|
|
\fBVersion:\fP
|
|
.RS 4
|
|
1\&.0
|
|
.RE
|
|
.PP
|
|
\fBDate:\fP
|
|
.RS 4
|
|
14/09/15
|
|
.RE
|
|
.PP
|
|
Inverse cosine expressed using complex logarithms:
|
|
.PP
|
|
.nf
|
|
|
|
arccos z = -i * log(z + i * sqrt(1 - z * z))
|
|
.fi
|
|
.PP
|
|
More info is available at Wikipedia:
|
|
.br
|
|
http://en.wikipedia.org/wiki/Inverse_trigonometric_functions#Logarithmic_forms
|
|
.PP
|
|
Definition at line 43 of file cacos\&.c\&.
|
|
.PP
|
|
References cadd(), clog(), cmul(), cpack(), csqrt(), and csub()\&.
|
|
.PP
|
|
Referenced by ComplexNumber::ArcCosine()\&.
|
|
.PP
|
|
.nf
|
|
44 {
|
|
45 complex a = cpack(1\&.0, 0\&.0);
|
|
46 complex i = cpack(0\&.0, 1\&.0);
|
|
47 complex j = cpack(0\&.0, -1\&.0);
|
|
48 complex p = csub(a, cmul(z, z));
|
|
49 complex q = clog(cadd(z, cmul(i, csqrt(p))));
|
|
50 complex w = cmul(j, q);
|
|
51 return w;
|
|
52 }
|
|
.fi
|
|
.SH "Author"
|
|
.PP
|
|
Generated automatically by Doxygen for amath from the source code\&.
|