mirror of
https://gitlab.com/rnger/amath
synced 2026-10-15 12:06:03 +00:00
77 lines
1.5 KiB
Plaintext
77 lines
1.5 KiB
Plaintext
.TH "lib/cplex/ccsc.c" 3 "Tue Jan 24 2017" "Version 1.6.2" "amath" \" -*- nroff -*-
|
|
.ad l
|
|
.nh
|
|
.SH NAME
|
|
lib/cplex/ccsc.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 \fBccsc\fP (\fBcomplex\fP z)"
|
|
.br
|
|
.RI "\fICosecant of a complex number\&. \fP"
|
|
.in -1c
|
|
.SH "Function Documentation"
|
|
.PP
|
|
.SS "\fBcomplex\fP ccsc (\fBcomplex\fP z)"
|
|
|
|
.PP
|
|
Cosecant of a complex number\&. Calculated as in Open Office:
|
|
.PP
|
|
.nf
|
|
|
|
a+bi
|
|
2\&.0 * sin(a) * cosh(b)
|
|
real = ------------------------------
|
|
cosh(2\&.0 * b) - cos(2\&.0 * a)
|
|
.fi
|
|
.PP
|
|
.PP
|
|
.PP
|
|
.nf
|
|
-2\&.0 * cos(a) * sinh(b)
|
|
imag = ------------------------------
|
|
cosh(2\&.0 * b) - cos(2\&.0 * a)
|
|
.fi
|
|
.PP
|
|
https://wiki.openoffice.org/wiki/Documentation/How_Tos/Calc:_IMCSC_function
|
|
.PP
|
|
Definition at line 47 of file ccsc\&.c\&.
|
|
.PP
|
|
References cimag(), cos(), cosh(), cpack(), creal(), sin(), and sinh()\&.
|
|
.PP
|
|
Referenced by ComplexNumber::Cosecant()\&.
|
|
.PP
|
|
.nf
|
|
48 {
|
|
49 complex w;
|
|
50 double a, b;
|
|
51 double d;
|
|
52
|
|
53 a = creal(z);
|
|
54 b = cimag(z);
|
|
55 d = cosh(2\&.0 * b) - cos(2\&.0 * a);
|
|
56
|
|
57 if (d == 0\&.0) {
|
|
58 w = cpack(HUGE, HUGE); // TODO: INF, INF
|
|
59 } else {
|
|
60 w = cpack((2\&.0 * sin(a) * cosh(b) / d), (-2\&.0 * cos(a) * sinh(b) / d));
|
|
61 }
|
|
62
|
|
63 return w;
|
|
64 }
|
|
.fi
|
|
.SH "Author"
|
|
.PP
|
|
Generated automatically by Doxygen for amath from the source code\&.
|