{"id":4039,"date":"2022-12-20T17:28:47","date_gmt":"2022-12-20T20:28:47","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/complex-man7\/"},"modified":"2022-12-20T17:28:47","modified_gmt":"2022-12-20T20:28:47","slug":"complex-man7","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/complex-man7\/","title":{"rendered":"COMPLEX (man7)"},"content":{"rendered":"<h1 align=\"center\">COMPLEX<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#EXAMPLES\">EXAMPLES<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#COLOPHON\">COLOPHON<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">complex \u2212 basics of complex mathematics<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>#include <complex.h><\/b><\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Complex numbers are numbers of the form z = a+b*i, where a and b are real numbers and i = sqrt(\u22121), so that i*i = \u22121.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">There are other ways to represent that number. The pair (a,b) of real numbers may be viewed as a point in the plane, given by X- and Y-coordinates. This same point may also be described by giving the pair of real numbers (r,phi), where r is the distance to the origin O, and phi the angle between the X-axis and the line Oz. Now z = r*exp(i*phi) = r*(cos(phi)+i*sin(phi)).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The basic operations are defined on z = a+b*i and w = c+d*i as: <b><br \/> addition: z+w = (a+c) + (b+d)*i <br \/> multiplication: z*w = (a*c \u2212 b*d) + (a*d + b*c)*i <br \/> division: z\/w = ((a*c + b*d)\/(c*c + d*d)) + ((b*c \u2212 a*d)\/(c*c + d*d))*i<\/b><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Nearly all math function have a complex counterpart but there are some complex-only functions.<\/p>\n<h2>EXAMPLES <a name=\"EXAMPLES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Your C-compiler can work with complex numbers if it supports the C99 standard. Link with <i>\u2212lm<\/i>. The imaginary unit is represented by I.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">\/* check that exp(i bodies manpages.csv script_extrae_body.sh script.sh usr pi) == \u22121 bodies\/ usr\/ <br \/> #include <math.h> \/bin \/boot \/dead.letter \/dev \/etc \/home \/initrd \/lib \/lib64 \/lost+found \/media \/mnt \/opt \/proc \/release-notes.html \/release-notes.txt \/root \/run \/sbin \/srv \/sys \/tmp \/usr \/var for atan bodies\/ usr\/ <br \/> #include <stdio.h> <br \/> #include <complex.h><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">int <br \/> main(void) <br \/> { <br \/> double pi = 4 bodies manpages.csv script_extrae_body.sh script.sh usr atan(1.0); <br \/> double complex z = cexp(I bodies manpages.csv script_extrae_body.sh script.sh usr pi); <br \/> printf(&#8220;%f + %f bodies manpages.csv script_extrae_body.sh script.sh usr in&#8221;, creal(z), cimag(z)); <br \/> }<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>cabs<\/b>(3), <b>cacos<\/b>(3), <b>cacosh<\/b>(3), <b>carg<\/b>(3), <b>casin<\/b>(3), <b>casinh<\/b>(3), <b>catan<\/b>(3), <b>catanh<\/b>(3), <b>ccos<\/b>(3), <b>ccosh<\/b>(3), <b>cerf<\/b>(3), <b>cexp<\/b>(3), <b>cexp2<\/b>(3), <b>cimag<\/b>(3), <b>clog<\/b>(3), <b>clog10<\/b>(3), <b>clog2<\/b>(3), <b>conj<\/b>(3), <b>cpow<\/b>(3), <b>cproj<\/b>(3), <b>creal<\/b>(3), <b>csin<\/b>(3), <b>csinh<\/b>(3), <b>csqrt<\/b>(3), <b>ctan<\/b>(3), <b>ctanh<\/b>(3)<\/p>\n<h2>COLOPHON <a name=\"COLOPHON\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This page is part of release 5.10 of the Linux <i>man-pages<\/i> project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https:\/\/www.kernel.org\/doc\/man\u2212pages\/.<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  complex \u2212 basics of complex mathematics <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[971],"tags":[973,1121,972],"class_list":["post-4039","post","type-post","status-publish","format-standard","hentry","category-7-miscelanea","tag-973","tag-complex","tag-man7"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4039","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=4039"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4039\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=4039"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=4039"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=4039"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}