Complex number arithmetic
来自cppreference.com
该页由英文版wiki使用Google Translate机器翻译而来。
该翻译可能存在错误或用词不当。鼠标停留在文本上可以看到原版本。你可以帮助我们修正错误或改进翻译。参见说明请点击这里. |
头
<complex.h>
定义宏,并宣布支持复杂的数字运算的功能。复杂值类型的值double complex
,float complex
,long double complex
原文:
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
, 如果宏常数
__STDC_IEC_559_COMPLEX__
(C99)由编译器定义,除了复杂类型的假想的类型也支持:double imaginary
,float imaginary
,和long double imaginary
。当假想的类型的值被转换为复杂类型的值,由此产生的复杂类型都有其实分量设置为零。当复杂类型的值被转换为假想的类型的值,实分量被丢弃.原文:
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.
如果宏常数
__STDC_NO_COMPLEX__
(C11)定义由编译器,头<complex.h>
,此处列出的所有的名字都没有提供.原文:
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.#pragma STDC CX_LIMITED_RANGE on是使用的,复杂的乘法,除法和绝对值可以使用简化的数学公式,尽管中间溢出的可能性.
原文:
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.
在头文件
<complex.h> 中定义 | |
| |
(C99) |
复杂类型的宏 (常量宏) |
(C99) |
复杂的单位不变 (常量宏) |
| |
(C99) |
虚类型的宏 (常量宏) |
(C99) |
虚数单位不变 (常量宏) |
(C99) |
复杂的或虚构的单位不变 原文: the complex or imaginary unit constant i (常量宏) |
| |
(C11) (C11) (C11) |
constructs a complex number from real and imaginary parts (函数宏) |
(C99) (C99) (C99) |
计算的虚数部的复数 原文: computes the imaginary part a complex number (函数) |
(C99) (C99) (C99) |
计算一个复数的实部 原文: computes the real part of a complex number (函数) |
(C99) (C99) (C99) |
计算一个复数的相位角 原文: computes the phase angle of a complex number (函数) |
(C99) (C99) (C99) |
计算的复数共轭 (函数) |
(C99) (C99) (C99) |
计算黎曼球上的投影 原文: computes the projection on Riemann sphere (函数) |
(C99) (C99) (C99) |
计算一个复数幅度 原文: computes the magnitude of a complex number (函数) |
| |
(C99) (C99) (C99) |
计算复杂的基e指数 原文: computes the complex base-e exponential (函数) |
(C99) (C99) (C99) |
计算复杂的自然对数 原文: computes the complex natural logarithm (函数) |
| |
(C99) (C99) (C99) |
计算复杂的电源功能 原文: computes the complex power function (函数) |
(C99) (C99) (C99) |
计算复杂的平方根 (函数) |
| |
(C99) (C99) (C99) |
计算复杂的反余弦值 (函数) |
(C99) (C99) (C99) |
计算复杂的反正弦 (函数) |
(C99) (C99) (C99) |
计算复杂的反正切 (函数) |
(C99) (C99) (C99) |
计算复杂的余弦 (函数) |
(C99) (C99) (C99) |
计算复杂的正弦 (函数) |
(C99) (C99) (C99) |
计算复杂的切线 (函数) |
| |
(C99) (C99) (C99) |
计算复杂的双曲余弦 原文: computes the complex arc hyperbolic cosine (函数) |
(C99) (C99) (C99) |
计算复杂的双曲正弦 原文: computes the complex arc hyperbolic sine (函数) |
(C99) (C99) (C99) |
computes the complex arc hyperbolic tangent (函数) |
(C99) (C99) (C99) |
计算复杂的双曲余弦值 原文: computes the complex hyperbolic cosine (函数) |
(C99) (C99) (C99) |
计算复杂的双曲正弦值 原文: computes the complex hyperbolic sine (函数) |
(C99) (C99) (C99) |
computes the complex hyperbolic tangent (函数) |