C Programming/complex.h/ccos: Difference between revisions
Appearance
[checked revision] | [checked revision] |
Content deleted Content added
mNo edit summary |
m Update syntaxhighlight tags - remove use of deprecated <source> tags |
||
(6 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
== Prototypes == |
|||
{{merge to|C Programming/Further math|discuss=Talk:math.h#Single page for C mathematical functions|date=October 2011}} |
|||
<syntaxhighlight lang="c"> |
|||
double complex cacos(double complex z); |
|||
float complex cacosf(float complex z); |
|||
long double complex cacosl(long double complex z); |
|||
</syntaxhighlight> |
|||
== Description == |
|||
The C library provides with the <code>ccos</code> function which gives the cosine of a complex number.It is included in the header file [[C Programming/C Reference/complex.h|complex.h]]. This function returns a double-precision floating point number.<br /> |
The C library provides with the <code>ccos</code> function which gives the cosine of a complex number.It is included in the header file [[C Programming/C Reference/complex.h|complex.h]]. This function returns a double-precision floating point number.<br /> |
||
The ccos function can be expressed as: |
The ccos function can be expressed as: |
||
ccosz = (exp (i * z) + exp (-i * z))/2<ref>"[http://linux.die.net/man/3/ccos ccos(3) - Linux man page]". die.net. Retrieved 20 September 2011.</ref> |
ccosz = (exp (i * z) + exp (-i * z))/2<ref>"[http://linux.die.net/man/3/ccos ccos(3) - Linux man page]". die.net. Retrieved 20 September 2011.</ref> |
||
Line 9: | Line 17: | ||
{{Reflist}} |
{{Reflist}} |
||
{{BookCat|filing=deep}} |
|||
[[Category:C Programming]] |
|||
[[Category:C Reference]] |
Latest revision as of 06:17, 16 April 2020
Prototypes
[edit | edit source]double complex cacos(double complex z);
float complex cacosf(float complex z);
long double complex cacosl(long double complex z);
Description
[edit | edit source]The C library provides with the ccos
function which gives the cosine of a complex number.It is included in the header file complex.h. This function returns a double-precision floating point number.
The ccos function can be expressed as:
ccosz = (exp (i * z) + exp (-i * z))/2[1]
References
[edit | edit source]- ↑ "ccos(3) - Linux man page". die.net. Retrieved 20 September 2011.