Namespaces
Variants
Views
Actions

Difference between revisions of "c/numeric/complex"

From cppreference.com
< c‎ | numeric
m (Shorten template names. Use {{lc}} where appropriate.)
m (Update links.)
Line 15: Line 15:
 
{{dsc header | complex.h}}
 
{{dsc header | complex.h}}
 
{{dsc h2 | Types}}
 
{{dsc h2 | Types}}
{{dsc inc | c/numeric/complex/dcl list complex}}
+
{{dsc inc | c/numeric/complex/dsc complex}}
{{dsc inc | c/numeric/complex/dcl list Complex_I}}
+
{{dsc inc | c/numeric/complex/dsc Complex_I}}
  
 
{{dsc h2 | The imaginary constant}}
 
{{dsc h2 | The imaginary constant}}
{{dsc inc | c/numeric/complex/dcl list imaginary}}
+
{{dsc inc | c/numeric/complex/dsc imaginary}}
{{dsc inc | c/numeric/complex/dcl list Imaginary_I}}
+
{{dsc inc | c/numeric/complex/dsc Imaginary_I}}
{{dsc inc | c/numeric/complex/dcl list I}}
+
{{dsc inc | c/numeric/complex/dsc I}}
  
 
{{dsc h2 | Manipulation}}
 
{{dsc h2 | Manipulation}}
{{dsc inc | c/numeric/complex/dcl list CMPLX}}
+
{{dsc inc | c/numeric/complex/dsc CMPLX}}
{{dsc inc | c/numeric/complex/dcl list cimag}}
+
{{dsc inc | c/numeric/complex/dsc cimag}}
{{dsc inc | c/numeric/complex/dcl list creal}}
+
{{dsc inc | c/numeric/complex/dsc creal}}
{{dsc inc | c/numeric/complex/dcl list carg}}
+
{{dsc inc | c/numeric/complex/dsc carg}}
{{dsc inc | c/numeric/complex/dcl list conj}}
+
{{dsc inc | c/numeric/complex/dsc conj}}
{{dsc inc | c/numeric/complex/dcl list cproj}}
+
{{dsc inc | c/numeric/complex/dsc cproj}}
{{dsc inc | c/numeric/complex/dcl list cabs}}
+
{{dsc inc | c/numeric/complex/dsc cabs}}
  
 
{{dsc h2 | Exponential functinos}}
 
{{dsc h2 | Exponential functinos}}
{{dsc inc | c/numeric/complex/dcl list cexp}}
+
{{dsc inc | c/numeric/complex/dsc cexp}}
{{dsc inc | c/numeric/complex/dcl list clog}}
+
{{dsc inc | c/numeric/complex/dsc clog}}
  
 
{{dsc h2 | Power functions}}
 
{{dsc h2 | Power functions}}
{{dsc inc | c/numeric/complex/dcl list cpow}}
+
{{dsc inc | c/numeric/complex/dsc cpow}}
{{dsc inc | c/numeric/complex/dcl list csqrt}}
+
{{dsc inc | c/numeric/complex/dsc csqrt}}
  
 
{{dsc h2 | Trigonometric functions}}
 
{{dsc h2 | Trigonometric functions}}
{{dsc inc | c/numeric/complex/dcl list cacos}}
+
{{dsc inc | c/numeric/complex/dsc cacos}}
{{dsc inc | c/numeric/complex/dcl list casin}}
+
{{dsc inc | c/numeric/complex/dsc casin}}
{{dsc inc | c/numeric/complex/dcl list catan}}
+
{{dsc inc | c/numeric/complex/dsc catan}}
{{dsc inc | c/numeric/complex/dcl list ccos}}
+
{{dsc inc | c/numeric/complex/dsc ccos}}
{{dsc inc | c/numeric/complex/dcl list csin}}
+
{{dsc inc | c/numeric/complex/dsc csin}}
{{dsc inc | c/numeric/complex/dcl list ctan}}
+
{{dsc inc | c/numeric/complex/dsc ctan}}
  
 
{{dsc h2 | Hyperbolic functions}}
 
{{dsc h2 | Hyperbolic functions}}
{{dsc inc | c/numeric/complex/dcl list cacosh}}
+
{{dsc inc | c/numeric/complex/dsc cacosh}}
{{dsc inc | c/numeric/complex/dcl list casinh}}
+
{{dsc inc | c/numeric/complex/dsc casinh}}
{{dsc inc | c/numeric/complex/dcl list catanh}}
+
{{dsc inc | c/numeric/complex/dsc catanh}}
{{dsc inc | c/numeric/complex/dcl list ccosh}}
+
{{dsc inc | c/numeric/complex/dsc ccosh}}
{{dsc inc | c/numeric/complex/dcl list csinh}}
+
{{dsc inc | c/numeric/complex/dsc csinh}}
{{dsc inc | c/numeric/complex/dcl list ctanh}}
+
{{dsc inc | c/numeric/complex/dsc ctanh}}
 
{{dsc end}}
 
{{dsc end}}
  

Revision as of 21:37, 31 May 2013

 
 
 
Complex number arithmetic
Types and the imaginary constant
(C99)
(C99)    
(C11)
(C99)
Manipulation
(C99)
(C99)
(C99)
(C99)
(C99)
(C99)
Power and exponential functions
(C99)
(C99)
(C99)
(C99)
Trigonometric functions
(C99)
(C99)
(C99)
(C99)
(C99)
(C99)
Hyperbolic functions
(C99)
(C99)
(C99)
(C99)
(C99)
(C99)
 

The header <complex.h> defines macros and declares functions that support complex number arithmetic. Complex values are values of type double complex, float complex, long double complex,

If the macro constant __STDC_IEC_559_COMPLEX__(C99) is defined by the compiler, in addition to the complex types, the imaginary types are also supported: double imaginary, float imaginary, and long double imaginary. When a value of imaginary type is converted to a value of complex type, the resulting complex type has its real component set to zero. When a value of complex type is converted to a value of imaginary type, the real component is discarded.

Standard arithmetic operators +, -, *, / can be used with real, complex, and imaginary types in any combination.

If the macro constant __STDC_NO_COMPLEX__(C11) is defined by the compiler, the header <complex.h> and all of the names listed here are not provided.

If #pragma STDC CX_LIMITED_RANGE on is used, complex multiplication, division, and absolute value may use simplified mathematical formulas, despite the possibility of intermediate overflow.

Defined in header <complex.h>

Contents

Types
complex type macro
(keyword macro) [edit]
the complex unit constant i
(macro constant) [edit]
The imaginary constant
imaginary type macro
(keyword macro) [edit]
the imaginary unit constant i
(macro constant) [edit]
(C99)
the complex or imaginary unit constant i
(macro constant) [edit]
Manipulation
(C11)(C11)(C11)
constructs a complex number from real and imaginary parts
(function macro) [edit]
(C99)(C99)(C99)
computes the imaginary part a complex number
(function) [edit]
(C99)(C99)(C99)
computes the real part of a complex number
(function) [edit]
(C99)(C99)(C99)
computes the phase angle of a complex number
(function) [edit]
(C99)(C99)(C99)
computes the complex conjugate
(function) [edit]
(C99)(C99)(C99)
computes the projection on Riemann sphere
(function) [edit]
(C99)(C99)(C99)
computes the magnitude of a complex number
(function) [edit]
Exponential functinos
(C99)(C99)(C99)
computes the complex base-e exponential
(function) [edit]
(C99)(C99)(C99)
computes the complex natural logarithm
(function) [edit]
Power functions
(C99)(C99)(C99)
computes the complex power function
(function) [edit]
(C99)(C99)(C99)
computes the complex square root
(function) [edit]
Trigonometric functions
(C99)(C99)(C99)
computes the complex arc cosine
(function) [edit]
(C99)(C99)(C99)
computes the complex arc sine
(function) [edit]
(C99)(C99)(C99)
computes the complex arc tangent
(function) [edit]
(C99)(C99)(C99)
computes the complex cosine
(function) [edit]
(C99)(C99)(C99)
computes the complex sine
(function) [edit]
(C99)(C99)(C99)
computes the complex tangent
(function) [edit]
Hyperbolic functions
(C99)(C99)(C99)
computes the complex arc hyperbolic cosine
(function) [edit]
(C99)(C99)(C99)
computes the complex arc hyperbolic sine
(function) [edit]
(C99)(C99)(C99)
computes the complex arc hyperbolic tangent
(function) [edit]
(C99)(C99)(C99)
computes the complex hyperbolic cosine
(function) [edit]
(C99)(C99)(C99)
computes the complex hyperbolic sine
(function) [edit]
(C99)(C99)(C99)
computes the complex hyperbolic tangent
(function) [edit]