<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh">
	<id>https://arolstar52-zhtest.hf.space/index.php?action=history&amp;feed=atom&amp;title=Complex.h</id>
	<title>Complex.h - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://arolstar52-zhtest.hf.space/index.php?action=history&amp;feed=atom&amp;title=Complex.h"/>
	<link rel="alternate" type="text/html" href="https://arolstar52-zhtest.hf.space/index.php?title=Complex.h&amp;action=history"/>
	<updated>2026-06-29T10:21:00Z</updated>
	<subtitle>在这个wiki上该页的修订历史</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://arolstar52-zhtest.hf.space/index.php?title=Complex.h&amp;diff=2151438&amp;oldid=prev</id>
		<title>imported&gt;Sohryu Asuka Langley Not Shikinami：​維護清理</title>
		<link rel="alternate" type="text/html" href="https://arolstar52-zhtest.hf.space/index.php?title=Complex.h&amp;diff=2151438&amp;oldid=prev"/>
		<updated>2025-06-02T11:42:19Z</updated>

		<summary type="html">&lt;p&gt;維護清理&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{noteTA&lt;br /&gt;
|G1=Math&lt;br /&gt;
|G2=IT&lt;br /&gt;
|1=zh-hans:宏; zh-hant:巨集;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{lowercase|title=complex.h}}&lt;br /&gt;
&lt;br /&gt;
{{C_Standard_library}} &amp;lt;!-- to edit this template go to [[template:C_Standard_library]] --&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;lt;code&amp;gt;complex.h&amp;lt;/code&amp;gt;&amp;#039;&amp;#039;&amp;#039;是[[C標準函数庫]]中的[[头文件]]，提供了[[复数 (数学)|复数]]算术所需要的宏定义与函数声明。 &lt;br /&gt;
==类型==&lt;br /&gt;
[[C99]]及[[C++11]]都规定了[[关键字]]&amp;lt;code&amp;gt;_Complex&amp;lt;/code&amp;gt;。因而有3种复数类型：&lt;br /&gt;
*&amp;lt;code&amp;gt;double _Complex&amp;lt;/code&amp;gt;&lt;br /&gt;
*&amp;lt;code&amp;gt;float _Complex&amp;lt;/code&amp;gt;&lt;br /&gt;
*&amp;lt;code&amp;gt;long double _Complex&amp;lt;/code&amp;gt;&lt;br /&gt;
次序不是必须遵守的，比如float _Complex也可以写成_Complex float。&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;_Complex_I&amp;lt;/code&amp;gt;扩展为类型为&amp;lt;code&amp;gt;const float _Complex&amp;lt;/code&amp;gt;的常量值，其值为虚数单位。 &lt;br /&gt;
&lt;br /&gt;
[[C99]]规定&amp;lt;code&amp;gt;complex&amp;lt;/code&amp;gt;作为宏扩展为&amp;lt;code&amp;gt;_Complex&amp;lt;/code&amp;gt;。但C++未定义&amp;lt;code&amp;gt;complex&amp;lt;/code&amp;gt;宏。&lt;br /&gt;
&lt;br /&gt;
[[gcc]]仅支持complex type，不支持imaginary type。因此宏&amp;lt;code&amp;gt;I&amp;lt;/code&amp;gt;扩展为&amp;lt;code&amp;gt;_Complex_I&amp;lt;/code&amp;gt;。&lt;br /&gt;
&lt;br /&gt;
定义复数变量时，可以如此：&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
double _Complex v1=3.1+5*I;&lt;br /&gt;
double _Complex v2=3.2+5*_Complex_I;&lt;br /&gt;
float _Complex v3=4.6f+12.0IF;  //必须先写i，后写f&lt;br /&gt;
_Complex float v4=8.2f+2.3if;&lt;br /&gt;
long double _Complex v5=1.23456789L+3.456789999iL; //必须先写i，后写L&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
也可以用CMPLX/CMPLXF/CMPLXL宏来表示相应复数表达式。&lt;br /&gt;
==函数==&lt;br /&gt;
*[[三角函數|複三角函数]]&lt;br /&gt;
**[[反余弦]]&lt;br /&gt;
***cacos	[[双精度]]版本&lt;br /&gt;
***cacosf	[[单精度]]版本&lt;br /&gt;
***cacosl	[[长双精度]]版本&lt;br /&gt;
**[[反正弦]]&lt;br /&gt;
***casin	双精度版本&lt;br /&gt;
***casinf	单精度版本&lt;br /&gt;
***casinl	长双精度版本&lt;br /&gt;
**[[反正切]]&lt;br /&gt;
***catan	双精度版本&lt;br /&gt;
***catanf	单精度版本&lt;br /&gt;
***catanl	长双精度版本&lt;br /&gt;
**[[余弦]]&lt;br /&gt;
***ccos		双精度版本&lt;br /&gt;
***ccosf	单精度版本&lt;br /&gt;
***ccosl	长双精度版本&lt;br /&gt;
**[[正弦]]&lt;br /&gt;
***csin		双精度版本&lt;br /&gt;
***csinf	单精度版本&lt;br /&gt;
***csinl	长双精度版本&lt;br /&gt;
**[[正切]]&lt;br /&gt;
***ctan		双精度版本&lt;br /&gt;
***ctanf	单精度版本&lt;br /&gt;
***ctanl	长双精度版本&lt;br /&gt;
*[[双曲函数|复双曲函数]]&lt;br /&gt;
**反双曲余弦&lt;br /&gt;
***cacosh	双精度版本&lt;br /&gt;
***cacoshf	单精度版本&lt;br /&gt;
***cacoshl	长双精度版本&lt;br /&gt;
**反双曲正弦&lt;br /&gt;
***casinh	双精度版本&lt;br /&gt;
***casinhf	单精度版本&lt;br /&gt;
***casinhl	长双精度版本&lt;br /&gt;
**反双曲正切&lt;br /&gt;
***catanh	双精度版本&lt;br /&gt;
***catanhf	单精度版本&lt;br /&gt;
***catanhl	长双精度版本&lt;br /&gt;
**双曲余弦&lt;br /&gt;
***ccosh	双精度版本&lt;br /&gt;
***ccoshf	单精度版本&lt;br /&gt;
***ccoshl	长双精度版本&lt;br /&gt;
**双曲正弦&lt;br /&gt;
***csinh	双精度版本&lt;br /&gt;
***csinhf	单精度版本&lt;br /&gt;
***csinhl	长双精度版本&lt;br /&gt;
**双曲正切&lt;br /&gt;
***ctanh	双精度版本&lt;br /&gt;
***ctanhf	单精度版本&lt;br /&gt;
***ctanhl	长双精度版本&lt;br /&gt;
*[[指數函數|指数]]与[[对数]]函数&lt;br /&gt;
**指数&lt;br /&gt;
***cexp		双精度版本&lt;br /&gt;
***cexpf	单精度版本&lt;br /&gt;
***cexpl	长双精度版本&lt;br /&gt;
**[[自然对数]]&lt;br /&gt;
***clog		双精度版本&lt;br /&gt;
***clogf	单精度版本&lt;br /&gt;
***clogl	长双精度版本&lt;br /&gt;
*[[幂]]运算和[[绝对值]]&lt;br /&gt;
**绝对值&lt;br /&gt;
***cabs		双精度版本&lt;br /&gt;
***cabsf	单精度版本&lt;br /&gt;
***cabsl	长双精度版本&lt;br /&gt;
**幂运算&lt;br /&gt;
***cpow		双精度版本&lt;br /&gt;
***cpowf	单精度版本&lt;br /&gt;
***cpowl	长双精度版本&lt;br /&gt;
**[[平方根]]&lt;br /&gt;
***csqrt	双精度版本&lt;br /&gt;
***csqrtf	单精度版本&lt;br /&gt;
***csqrtl	长双精度版本&lt;br /&gt;
*操作&lt;br /&gt;
**[[相位|相角]]&lt;br /&gt;
***carg		双精度版本&lt;br /&gt;
***cargf	单精度版本&lt;br /&gt;
***cargl	长双精度版本&lt;br /&gt;
**[[複數 (數學)|虚部]]&lt;br /&gt;
***cimag	双精度版本&lt;br /&gt;
***cimagf	单精度版本&lt;br /&gt;
***cimagl	长双精度版本&lt;br /&gt;
**[[复共轭]]&lt;br /&gt;
***cong		双精度版本&lt;br /&gt;
***congf	单精度版本&lt;br /&gt;
***congl	长双精度版本&lt;br /&gt;
**[[黎曼球面]][[投影]]&lt;br /&gt;
***cproj	双精度版本&lt;br /&gt;
***cprojf	单精度版本&lt;br /&gt;
***cprojl	长双精度版本&lt;br /&gt;
**[[複數 (數學)|实部]]&lt;br /&gt;
***creal	双精度版本&lt;br /&gt;
***crealf	单精度版本&lt;br /&gt;
***creall	长双精度版本&lt;br /&gt;
&lt;br /&gt;
==参考文献==&lt;br /&gt;
{{reflist}}&lt;br /&gt;
*C11 n1570 标准 7.3节&lt;br /&gt;
[[Category:C標準函式庫|V]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Sohryu Asuka Langley Not Shikinami</name></author>
	</entry>
</feed>