亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? cmplx.c

?? 巴特沃斯、切比雪夫I和橢圓濾波器設計的源程序!非常難得! 簡潔的C語言編寫
?? C
字號:
/*							cmplx.c * *	Complex number arithmetic * * * * SYNOPSIS: * * typedef struct { *      double r;     real part *      double i;     imaginary part *     }cmplx; * * cmplx *a, *b, *c; * * cadd( a, b, c );     c = b + a * csub( a, b, c );     c = b - a * cmul( a, b, c );     c = b * a * cdiv( a, b, c );     c = b / a * cneg( c );           c = -c * cmov( b, c );        c = b * * * * DESCRIPTION: * * Addition: *    c.r  =  b.r + a.r *    c.i  =  b.i + a.i * * Subtraction: *    c.r  =  b.r - a.r *    c.i  =  b.i - a.i * * Multiplication: *    c.r  =  b.r * a.r  -  b.i * a.i *    c.i  =  b.r * a.i  +  b.i * a.r * * Division: *    d    =  a.r * a.r  +  a.i * a.i *    c.r  = (b.r * a.r  + b.i * a.i)/d *    c.i  = (b.i * a.r  -  b.r * a.i)/d * ACCURACY: * * In DEC arithmetic, the test (1/z) * z = 1 had peak relative * error 3.1e-17, rms 1.2e-17.  The test (y/z) * (z/y) = 1 had * peak relative error 8.3e-17, rms 2.1e-17. * * Tests in the rectangle {-10,+10}: *                      Relative error: * arithmetic   function  # trials      peak         rms *    DEC        cadd       10000       1.4e-17     3.4e-18 *    IEEE       cadd      100000       1.1e-16     2.7e-17 *    DEC        csub       10000       1.4e-17     4.5e-18 *    IEEE       csub      100000       1.1e-16     3.4e-17 *    DEC        cmul        3000       2.3e-17     8.7e-18 *    IEEE       cmul      100000       2.1e-16     6.9e-17 *    DEC        cdiv       18000       4.9e-17     1.3e-17 *    IEEE       cdiv      100000       3.7e-16     1.1e-16 *//*				cmplx.c * complex number arithmetic *//*Cephes Math Library Release 2.8:  June, 2000Copyright 1984, 1995, 2000 by Stephen L. Moshier*/#include "mconf.h"#ifdef ANSIPROTextern double fabs ( double );extern double cabs ( cmplx * );extern double sqrt ( double );extern double atan2 ( double, double );extern double cos ( double );extern double sin ( double );extern double sqrt ( double );extern double frexp ( double, int * );extern double ldexp ( double, int );int isnan ( double );void cdiv ( cmplx *, cmplx *, cmplx * );void cadd ( cmplx *, cmplx *, cmplx * );#elsedouble fabs(), cabs(), sqrt(), atan2(), cos(), sin();double sqrt(), frexp(), ldexp();int isnan();void cdiv(), cadd();#endifextern double MAXNUM, MACHEP, PI, PIO2, INFINITY, NAN;/*typedef struct	{	double r;	double i;	}cmplx;*/cmplx czero = {0.0, 0.0};extern cmplx czero;cmplx cone = {1.0, 0.0};extern cmplx cone;/*	c = b + a	*/void cadd( a, b, c )register cmplx *a, *b;cmplx *c;{c->r = b->r + a->r;c->i = b->i + a->i;}/*	c = b - a	*/void csub( a, b, c )register cmplx *a, *b;cmplx *c;{c->r = b->r - a->r;c->i = b->i - a->i;}/*	c = b * a */void cmul( a, b, c )register cmplx *a, *b;cmplx *c;{double y;y    = b->r * a->r  -  b->i * a->i;c->i = b->r * a->i  +  b->i * a->r;c->r = y;}/*	c = b / a */void cdiv( a, b, c )register cmplx *a, *b;cmplx *c;{double y, p, q, w;y = a->r * a->r  +  a->i * a->i;p = b->r * a->r  +  b->i * a->i;q = b->i * a->r  -  b->r * a->i;if( y < 1.0 )	{	w = MAXNUM * y;	if( (fabs(p) > w) || (fabs(q) > w) || (y == 0.0) )		{		c->r = MAXNUM;		c->i = MAXNUM;		mtherr( "cdiv", OVERFLOW );		return;		}	}c->r = p/y;c->i = q/y;}/*	b = a   Caution, a `short' is assumed to be 16 bits wide.  */void cmov( a, b )void *a, *b;{register short *pa, *pb;int i;pa = (short *) a;pb = (short *) b;i = 8;do	*pb++ = *pa++;while( --i );}void cneg( a )register cmplx *a;{a->r = -a->r;a->i = -a->i;}/*							cabs() * *	Complex absolute value * * * * SYNOPSIS: * * double cabs(); * cmplx z; * double a; * * a = cabs( &z ); * * * * DESCRIPTION: * * * If z = x + iy * * then * *       a = sqrt( x**2 + y**2 ). *  * Overflow and underflow are avoided by testing the magnitudes * of x and y before squaring.  If either is outside half of * the floating point full scale range, both are rescaled. * * * ACCURACY: * *                      Relative error: * arithmetic   domain     # trials      peak         rms *    DEC       -30,+30     30000       3.2e-17     9.2e-18 *    IEEE      -10,+10    100000       2.7e-16     6.9e-17 *//*Cephes Math Library Release 2.1:  January, 1989Copyright 1984, 1987, 1989 by Stephen L. MoshierDirect inquiries to 30 Frost Street, Cambridge, MA 02140*//*typedef struct	{	double r;	double i;	}cmplx;*/#ifdef UNK#define PREC 27#define MAXEXP 1024#define MINEXP -1077#endif#ifdef DEC#define PREC 29#define MAXEXP 128#define MINEXP -128#endif#ifdef IBMPC#define PREC 27#define MAXEXP 1024#define MINEXP -1077#endif#ifdef MIEEE#define PREC 27#define MAXEXP 1024#define MINEXP -1077#endifdouble cabs( z )register cmplx *z;{double x, y, b, re, im;int ex, ey, e;#ifdef INFINITIES/* Note, cabs(INFINITY,NAN) = INFINITY. */if( z->r == INFINITY || z->i == INFINITY   || z->r == -INFINITY || z->i == -INFINITY )  return( INFINITY );#endif#ifdef NANSif( isnan(z->r) )  return(z->r);if( isnan(z->i) )  return(z->i);#endifre = fabs( z->r );im = fabs( z->i );if( re == 0.0 )	return( im );if( im == 0.0 )	return( re );/* Get the exponents of the numbers */x = frexp( re, &ex );y = frexp( im, &ey );/* Check if one number is tiny compared to the other */e = ex - ey;if( e > PREC )	return( re );if( e < -PREC )	return( im );/* Find approximate exponent e of the geometric mean. */e = (ex + ey) >> 1;/* Rescale so mean is about 1 */x = ldexp( re, -e );y = ldexp( im, -e );		/* Hypotenuse of the right triangle */b = sqrt( x * x  +  y * y );/* Compute the exponent of the answer. */y = frexp( b, &ey );ey = e + ey;/* Check it for overflow and underflow. */if( ey > MAXEXP )	{	mtherr( "cabs", OVERFLOW );	return( INFINITY );	}if( ey < MINEXP )	return(0.0);/* Undo the scaling */b = ldexp( b, e );return( b );}/*							csqrt() * *	Complex square root * * * * SYNOPSIS: * * void csqrt(); * cmplx z, w; * * csqrt( &z, &w ); * * * * DESCRIPTION: * * * If z = x + iy,  r = |z|, then * *                       1/2 * Im w  =  [ (r - x)/2 ]   , * * Re w  =  y / 2 Im w. * * * Note that -w is also a square root of z.  The root chosen * is always in the upper half plane. * * Because of the potential for cancellation error in r - x, * the result is sharpened by doing a Heron iteration * (see sqrt.c) in complex arithmetic. * * * * ACCURACY: * *                      Relative error: * arithmetic   domain     # trials      peak         rms *    DEC       -10,+10     25000       3.2e-17     9.6e-18 *    IEEE      -10,+10    100000       3.2e-16     7.7e-17 * *                        2 * Also tested by csqrt( z ) = z, and tested by arguments * close to the real axis. */void csqrt( z, w )cmplx *z, *w;{cmplx q, s;double x, y, r, t;x = z->r;y = z->i;if( y == 0.0 )	{	if( x < 0.0 )		{		w->r = 0.0;		w->i = sqrt(-x);		return;		}	else		{		w->r = sqrt(x);		w->i = 0.0;		return;		}	}if( x == 0.0 )	{	r = fabs(y);	r = sqrt(0.5*r);	if( y > 0 )		w->r = r;	else		w->r = -r;	w->i = r;	return;	}/* Approximate  sqrt(x^2+y^2) - x  =  y^2/2x - y^4/24x^3 + ... . * The relative error in the first term is approximately y^2/12x^2 . */if( (fabs(y) < 2.e-4 * fabs(x))   && (x > 0) )	{	t = 0.25*y*(y/x);	}else	{	r = cabs(z);	t = 0.5*(r - x);	}r = sqrt(t);q.i = r;q.r = y/(2.0*r);/* Heron iteration in complex arithmetic */cdiv( &q, z, &s );cadd( &q, &s, w );w->r *= 0.5;w->i *= 0.5;}double hypot( x, y )double x, y;{cmplx z;z.r = x;z.i = y;return( cabs(&z) );}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人av免费网站| 国产丝袜欧美中文另类| 日韩一区二区三区观看| 亚洲精品在线观看视频| 欧美国产一区在线| 亚洲精选一二三| 国产美女精品人人做人人爽| 95精品视频在线| 欧美日韩极品在线观看一区| 久久久久久久免费视频了| 亚洲激情自拍视频| 国产精品一二三区| 欧美日韩国产天堂| 亚洲卡通欧美制服中文| 另类调教123区| 欧亚一区二区三区| 国产精品美女久久福利网站| 免费在线看成人av| 在线观看亚洲一区| 国产精品久久久久精k8| 国内国产精品久久| 欧美日韩国产另类不卡| 亚洲天堂2014| 国产成人aaaa| 国产日韩欧美精品一区| 美国毛片一区二区| 欧美一区2区视频在线观看| 一区二区久久久久久| 不卡一区二区三区四区| 久久久久久久久97黄色工厂| 免费av成人在线| 日韩一卡二卡三卡国产欧美| 亚洲成av人影院在线观看网| 色噜噜狠狠一区二区三区果冻| 婷婷综合久久一区二区三区| 99久久综合狠狠综合久久| 国产亚洲成aⅴ人片在线观看 | 色悠久久久久综合欧美99| 久久先锋影音av鲁色资源| 免费欧美在线视频| 久久久综合九色合综国产精品| 日韩一区二区在线看| 亚洲国产精品久久人人爱蜜臀| 日本亚洲欧美天堂免费| 欧美年轻男男videosbes| 日韩精品色哟哟| 91精品黄色片免费大全| 美女国产一区二区| 国产精品视频在线看| 91色视频在线| 丝袜亚洲另类丝袜在线| 国产亚洲欧洲997久久综合 | 国产精品一二二区| 日本久久一区二区| 国产综合色产在线精品 | 99久久免费精品| 久久久久亚洲综合| 成人av片在线观看| 亚洲一区二区三区四区在线 | 久久久国产综合精品女国产盗摄| 久久嫩草精品久久久精品| 国产呦精品一区二区三区网站| 国产精品一区二区在线观看不卡 | 99国产精品久| 一区二区三区中文字幕电影| 欧美日韩亚洲综合在线 | 中文字幕在线一区| av电影一区二区| 一区二区在线观看视频| 欧美不卡一区二区| 色婷婷久久久亚洲一区二区三区| 91精品国产品国语在线不卡| 大尺度一区二区| 肉色丝袜一区二区| 最新日韩av在线| 日韩精品最新网址| 欧美男男青年gay1069videost| 亚洲欧洲国产日韩| 欧美一区二区三区电影| 一本一道久久a久久精品综合蜜臀| 精品噜噜噜噜久久久久久久久试看| 亚洲男女一区二区三区| 欧美日韩亚洲综合| 色94色欧美sute亚洲13| 粉嫩aⅴ一区二区三区四区 | 中文字幕欧美三区| 欧美最猛黑人xxxxx猛交| 国产激情一区二区三区| 青青草国产成人99久久| 五月天视频一区| 亚洲国产一区二区在线播放| 国产欧美日韩在线| 国产亚洲欧美色| 日本一区二区三区久久久久久久久不| 韩国v欧美v日本v亚洲v| 亚洲bt欧美bt精品777| 亚洲愉拍自拍另类高清精品| 一区二区三区自拍| 亚洲国产视频在线| 三级影片在线观看欧美日韩一区二区| 欧美久久一二三四区| 欧美人xxxx| 欧美成人video| 国产无一区二区| 国产欧美精品一区| 一区二区三区在线视频观看 | 成人晚上爱看视频| 91性感美女视频| 欧美视频在线观看一区二区| 97精品久久久午夜一区二区三区| 一区二区在线看| 亚洲二区视频在线| 精品午夜久久福利影院 | 亚洲超碰精品一区二区| 三级久久三级久久久| 美腿丝袜亚洲综合| 成人福利视频在线| 在线综合视频播放| 欧美高清在线一区二区| 一区二区在线观看视频在线观看| 欧美一区二区视频观看视频 | 国产成人午夜精品影院观看视频 | 精品va天堂亚洲国产| 久久久精品影视| 一区二区视频在线看| 日韩成人一区二区| 波多野结衣一区二区三区| 在线免费精品视频| 国产亚洲欧美在线| 青娱乐精品在线视频| 91美女在线观看| 国产亚洲污的网站| 日韩国产欧美在线播放| 一本一本大道香蕉久在线精品 | 中文字幕视频一区| 日韩国产欧美在线视频| 国产精品小仙女| 制服丝袜av成人在线看| 艳妇臀荡乳欲伦亚洲一区| 国产毛片精品国产一区二区三区| 激情综合一区二区三区| 欧美精品日韩综合在线| 亚洲一二三四在线| 97久久精品人人爽人人爽蜜臀| 99热精品一区二区| 国产精品视频一二| 波多野结衣亚洲| 国产精品美女久久久久久 | 亚洲男女一区二区三区| 国产精品一区二区视频| 久久久久久99精品| 国产乱子伦一区二区三区国色天香| 精品一区二区在线视频| 欧美xxxxx牲另类人与| 久久精品国产亚洲高清剧情介绍| 精品一区二区影视| 精品女同一区二区| 国产经典欧美精品| 久久久国产精华| 91女厕偷拍女厕偷拍高清| 亚洲女女做受ⅹxx高潮| 欧美男男青年gay1069videost| 精品久久久久香蕉网| 国内精品自线一区二区三区视频| 国产一区二区免费看| 欧美经典一区二区| 欧美在线|欧美| 紧缚奴在线一区二区三区| 久久久精品黄色| 色综合久久中文字幕| 亚洲高清一区二区三区| 久久久久久久久久久久久久久99 | 久久色成人在线| 色综合网站在线| 精品一区二区三区欧美| 国产精品国产三级国产有无不卡 | 日韩一级完整毛片| 国产精品亚洲一区二区三区妖精| 日本韩国一区二区| 国产一区二区中文字幕| 亚洲一卡二卡三卡四卡| 国产欧美日韩精品在线| 欧美体内she精视频| 成人性色生活片免费看爆迷你毛片| 91麻豆精品国产91久久久资源速度| 国产精品久久久久久久久晋中 | 久久久久久久久久美女| 成人av集中营| 久久99精品久久只有精品| 亚洲在线中文字幕| 亚洲视频一区二区在线| 国产精品欧美精品| 久久久久久久久免费| 欧美一级免费观看| 色偷偷久久一区二区三区| 成人精品亚洲人成在线| 国产精品亚洲一区二区三区在线| 国产视频一区在线播放| 2欧美一区二区三区在线观看视频| 久久精品国产在热久久|