📄 complex.3
字号:
.\" Copyright (c) 1987, 1990 Entropic Speech, Inc.; All rights reserved.\" @(#)complex.3 1.5 19 Mar 1990 ESI.TH COMPLEX 3\-ESPSsp 19 Mar 1990.ds ]W "\fI\s+4\ze\h'0.05'e\s-4\v'-0.4m'\fP\(*p\v'0.4m'\ Entropic Speech, Inc..SH NAME.nfcadd \- returns the complex sum of two complex numberscsub \- returns the complex difference of two complex numberscmult \- returns the complex product of two complex numberscdiv \- returns the complex division of two complex numbersconj \- returns the complex conjugate of its argumentrealmult \- returns the complex product of a real and a complex numberrealadd \- returns the complex result of adding a real and a complexcmultacc \- returns the product of two complex numbers added to a thirdmodul \- returns the absolute value of a complex numbercsqrt \- returns the square root (positive real if possible) of a complex number.SH SYNOPSIS.ft Btypedef struct {.br double real;.br double imag;.br} double_cplx;.sp.PP.ft B# include <esps/esps.h>.sp.PP.ft Bdouble_cplx cadd (x, y).brdouble_cplx x, y;.PP.ft Bdouble_cplx csub (x, y).brdouble_cplx x, y;.PP.ft Bdouble_cplx cmult (x, y).brdouble_cplx x, y;.PP.ft Bdouble_cplx cdiv (x, y).brdouble_cplx x, y;.PP.ft Bdouble_cplx conj (x).brdouble_cplx x;.PP.ft Bdouble_cplx realmult (x, r).brdouble r;.brdouble_cplx x;.PP.ft Bdouble_cplx realadd (x, r).brdouble r;.brdouble_cplx x;.PP.ft Bdouble_cplx cmultacc (x, y, z).brdouble_cplx x, y, z;.PP.ft Bdouble modul (x).brdouble_cplx x;.PP.ft Bdouble_cplx csqrt(x).brdouble_cplx x;.SH DESCRIPTION.PPEach function operates on one or more complex numbers. The typedefdouble_cplx is defined by the inclusion of \fI<esps/esps.h>\fR,and it is shown above for reference. The typedef COMPLEX was used in previous versions of ESPS, and is defined and for convenience is now defined as a synonym for double_cplx. .sp.PP.I cadd adds two complex numbers and returns their sum..sp.PP.I csubsubtracts \fIy\fR from \fIx\fR and returns the difference..sp.PP.I cmultmultiplies \fIx\fR by \fIy\fR and returns the product..sp.PP.I cdivdivides \fIx\fR by \fIy\fR and returns the quotient..sp.PP.I conjreturns the complex conjugate of \fIx\fR..sp.PP.I realmultmultiplies the complex number \fIx\fR by the real number \fIy\fRand returns the product..sp.PP.I realaddaddes the complex number \fIx\fP to the real number \fIr\fPand returns the sum..sp.PP.I cmultaccmultiplies \fIx\fR by \fIy\fR, adds it to \fIz\fR, and returnsthe sum..sp.PP.I modulreturns the absolute value, or modulus, of \fIx\fR..sp.PP.I csqrtreturns the square root of \fIx\fR..SH DIAGNOSTICS.PP.I cdivwarns and exits if the divisor is zero..SH AUTHORCode by B. F. Frankel; ESPS modification, sqrt, and realadd by D. Burton;manual page by D. Burton.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -