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

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

?? complex.c.sh

?? 復數運算庫
?? SH
?? 第 1 頁 / 共 2 頁
字號:
#! /bin/sh# This is a shell archive.  Remove anything before this line, then unpack# it by saving it into a file and typing "sh file".  To overwrite existing# files, type "sh file -c".  You can also feed this as standard input via# unshar, or by typing "sh <file", e.g..  If this archive is complete, you# will see the following message at the end:#		"End of shell archive."# Contents:  Makefile complex.3 complex.h cx_test.c cxadd.c cxampl.c#   cxconj.c cxcons.c cxcopy.c cxdiv.c cxmul.c cxphas.c cxphsr.c#   cxscal.c cxsqrt.c cxsub.cPATH=/bin:/usr/bin:/usr/ucb ; export PATHif test -f Makefile -a "${1}" != "-c" ; then   echo shar: Will not over-write existing file \"Makefile\"elseecho shar: Extracting \"Makefile\" \(395 characters\)sed "s/^X//" >Makefile <<'END_OF_Makefile'XALL=complex.3 complex.h libcomplex.aXOBJS=\X    cxadd.o cxampl.o cxconj.o cxcons.o cxcopy.o cxdiv.o cxmul.o \X    cxphas.o cxphsr.o cxscal.o cxsqrt.o cxsub.oXXall:	$(ALL)XXinstall:	$(ALL)X	@echo install $(ALL) according to local convention.XXcx_test:	cx_test.c libcomplex.aX	$(CC) $(CFLAGS) -o cx_test cx_test.c libcomplex.aXXlibcomplex.a:	$(OBJS)X	ar r libcomplex.a $(OBJS)XX$(OBJS):	complex.hEND_OF_Makefileif test 395 -ne `wc -c <Makefile`; then    echo shar: \"Makefile\" unpacked with wrong size!fi# end of overwriting checkfiif test -f complex.3 -a "${1}" != "-c" ; then   echo shar: Will not over-write existing file \"complex.3\"elseecho shar: Extracting \"complex.3\" \(5830 characters\)sed "s/^X//" >complex.3 <<'END_OF_complex.3'X'\" eX.TH COMPLEX 3V LOCALX'\"	last edit:	86/02/03	D A GwynX'\"	SCCS ID:	@(#)complex.3	1.2 (modified for public version)X.EQXdelim @@X.ENX.SH NAMEXcomplex \- complex arithmetic operationsX.SH SYNOPSISX.BX#include <complex.h>	/* assuming appropriate cc \-I option */X.brX/* All the following functions are declared in this header file. */X.PX.B complex *CxAdd(ap,bp);X.brX.B complex *ap, *bp;X.PX.B complex *CxSub(ap,bp);X.brX.B complex *ap, *bp;X.PX.B complex *CxMul(ap,bp);X.brX.B complex *ap, *bp;X.PX.B complex *CxDiv(ap,bp);X.brX.B complex *ap, *bp;X.PX.B complex *CxSqrt(cp);X.brX.B complex *cp;X.PX.B complex *CxScal(cp,\^s);X.brX.B complex *cp;X.brX.B double s;X.PX.B complex *CxNeg(cp);X.brX.B complex *cp;X.PX.B complex *CxConj(cp);X.brX.B complex *cp;X.PX.B complex *CxCopy(ap,bp);X.brX.B complex *ap, *bp;X.PX.B complex *CxCons(cp,\^r,\^i);X.brX.B complex *cp;X.brX.B double r, i;X.PX.B complex *CxPhsr(cp,m,p);X.brX.B complex *cp;X.brX.B double m, p;X.PX.B double CxReal(cp);X.brX.B complex *cp;X.PX.B double CxImag(cp);X.brX.B complex *cp;X.PX.B double CxAmpl(cp);X.brX.B complex *cp;X.PX.B double CxPhas(cp);X.brX.B complex *cp;X.PX.B complex *CxAllo(\ );X.PX.B void CxFree(cp);X.brX.B complex *cp;X.SH DESCRIPTIONXThese routines perform arithmeticXand other useful operations on complex numbers.XAn appropriate data structureX.B complexXis defined in the header file;Xall access toX.B complexXdata should beX.I viaXthese predefined functions.X(SeeX.SM HINTSXfor further information.)X.PXIn the following descriptions,Xthe namesX.IR a ,X.IR b ,XandX.I cXrepresent theX.B complexXdata addressed by the corresponding pointersX.IR ap ,X.IR bp ,XandX.IR cp .X.PX.I CxAdd\^XaddsX.I bXtoX.I aXand returns a pointer to the result.X.PX.I CxSubXsubtractsX.I bXfromX.I aXand returns a pointer to the result.X.PX.I CxMul\^XmultipliesX.I aXbyX.I bXand returns a pointer to the result.X.PX.I CxDivXdividesX.I aXbyX.I bXand returns a pointer to the result.XThe divisor must not be precisely zero.X.PX.I CxSqrtXreplacesX.I cXby the ``principal value'' of its square rootX(one having a non-negative imaginary part)Xand returns a pointer to the result.X.PX.I CxScal\^XmultipliesX.I cXby the scalarX.I sXand returns a pointer to the result.X.PX.I CxNegXnegatesX.I cXand returns a pointer to the result.X.PX.I CxConjXconjugatesX.I cXand returns a pointer to the result.X.PX.I CxCopyXassigns the value ofX.I bXtoX.I aXand returns a pointer to the result.X.PX.I CxConsXconstructs the complex numberX.I cXfrom its real and imaginary partsX.I rXandX.IR i ,Xrespectively,Xand returns a pointer to the result.X.PX.I CxPhsrXconstructs the complex numberX.I cXfrom its ``phasor'' amplitude and phase (given in radians)X.I mXandX.IR p ,Xrespectively,Xand returns a pointer to the result.X.PX.I CxReal\^Xreturns the real part of the complex numberX.IR c .X.PX.I CxImagXreturns the imaginary part of the complex numberX.IR c .X.PX.I CxAmpl\^Xreturns the amplitude of the complex numberX.IR c .X.PX.I CxPhasXreturns the phase of the complex numberX.IR c ,Xas radians in the range @(- pi , pi ]@.X.PX.I CxAlloXallocates storage for aX.B complexXdatum; it returnsX.SMX.B NULLX(defined as 0 inX.BR <stdio.h> )Xif not enough storage is available.X.PX.I CxFreeXreleases storage previously allocated byX.IR CxAllo .XThe contents of such storage must not be used afterward.X.SH HINTSXTheX.B complexXdata type consists of real and imaginary components;X.I CxReal\^XandX.I CxImagXare actually macros that access these components directly.XThis allows addresses of the components to be taken,Xas in the following \s-1EXAMPLE\s0.X.PXThe complex functions are designed to be nested;Xsee the following \s-1EXAMPLE\s0.XFor this reason,Xmany of them modify the contents of their first parameter.X.I CxCopyXcan be used to create a ``working copy'' ofX.B complexXdata that would otherwise be modified.X.PXThe square-root function is inherently double-valued;Xin most applications, both roots should receive equal consideration.XThe second root is the negative of the ``principal value''.X.bpX.SH EXAMPLEXThe following program is compiled by the commandX.brX	$ \fIcc \|\-I/usr/local/include \|example.c \|/usr/local/lib/libcomplex.a \|\-lm\fPX.brXIt reads in two complex vectors,Xthen computes and prints their inner product.X.spX.PX	#include	<stdio.h>X.brX	#include	<complex.h>X.spX	main( argc, argv )X.brX		int		argc;X.brX		char		*argv[\|];X.brX		{X.brX		int		n;		/* # elements in each array */X.brX		int		i;		/* indexes arrays */X.brX		complex		a[10], b[10];	/* input vectors */X.brX		complex		s;		/* accumulates scalar product */X.brX		complex		*c = CxAllo(\|);	/* holds cross-term */X.spX		if ( c == NULL )X.brX			{X.brX			(void)fprintf( stderr, ``not enough memory\en'' );X.brX			return 1;X.brX			}X.brX		(void)printf( ``\enenter number of elements: '' );X.brX		(void)scanf( `` %d'', &n );X.brX		/* (There really should be some input validation here.) */X.brX		(void) printf( ``\enenter real, imaginary pairs for first array:\en'' );X.brX		for ( i = 0; i < n; ++i )X.brX			(void)scanf( `` %lg %lg'', &CxReal( &a[i] ), &CxImag( &a[i] ) );X.brX		(void)printf( ``\enenter real, imaginary pairs for second array:\en'' );X.brX		for ( i = 0; i < n; ++i )X.brX			(void)scanf( `` %lg %lg'', &CxReal( &b[i] ), &CxImag( &b[i] ) );X.brX		(void)CxCons( &s, 0.0, 0.0 );	/* initialize accumulator */X.brX		for ( i = 0; i < n; ++i )X.brX			(void)CxAdd( &s, CxMul( &a[i], CxConj( CxCopy( c, &b[i] ) ) ) );X.brX		(void)printf( ``\enproduct is (%g,%g)\en'', CxReal( &s ), CxImag( &s ) );X.brX		CxFree( c );X.brX		return 0;X.brX		}X.SH FILESX/usr/local/include/complex.h		header file containing definitionsX.brX/usr/local/lib/libcomplex.a		complex run-time support libraryX.SH AUTHORSXDouglas A. Gwyn, BRL/VLD-VMBX.brXJeff Hanes, BRL/VLD-VMB (original version ofX.IR CxSqrt\^ )END_OF_complex.3if test 5830 -ne `wc -c <complex.3`; then    echo shar: \"complex.3\" unpacked with wrong size!fi# end of overwriting checkfiif test -f complex.h -a "${1}" != "-c" ; then   echo shar: Will not over-write existing file \"complex.h\"elseecho shar: Extracting \"complex.h\" \(966 characters\)sed "s/^X//" >complex.h <<'END_OF_complex.h'X/*X	<complex.h> -- definitions for complex arithmetic routinesXX	last edit:	86/01/04	D A GwynXX	SCCS ID:	@(#)complex.h	1.1 (modified for public version)X*/XX/* "complex number" data type: */XXtypedef structX	{X	double		re;		/* real part */X	double		im;		/* imaginary part */X	}	complex;XX/* "The future is now": */XX#ifdef __STDC__	/* X3J11 */X#define	_CxGenPtr	void *		/* generic pointer type */X#else		/* K&R */X#define	_CxGenPtr	char *		/* generic pointer type */X#endifXX/* functions that are correctly done as macros: */XX#define	CxAllo()		((complex *)malloc( sizeof (complex) ))X#define	CxFree( cp )		free( (_CxGenPtr)(cp) )X#define	CxNeg( cp )		CxScal( cp, -1.0 )X#define	CxReal( cp )		(cp)->reX#define	CxImag( cp )		(cp)->imXXextern void		free();Xextern _CxGenPtr	malloc();XX/* library functions: */XXextern double	CxAmpl(), CxPhas();Xextern complex	*CxAdd(), *CxConj(), *CxCons(), *CxCopy(), *CxDiv(),X		*CxMul(), *CxPhsr(), *CxScal(), *CxSqrt(), *CxSub();END_OF_complex.hif test 966 -ne `wc -c <complex.h`; then    echo shar: \"complex.h\" unpacked with wrong size!fi# end of overwriting checkfiif test -f cx_test.c -a "${1}" != "-c" ; then   echo shar: Will not over-write existing file \"cx_test.c\"elseecho shar: Extracting \"cx_test.c\" \(4250 characters\)sed "s/^X//" >cx_test.c <<'END_OF_cx_test.c'X/*X	ctest -- complex arithmetic testXX	last edit:	86/01/04	D A GwynXX	SCCS ID:	@(#)cx_test.c	1.1 (modified for public version)X*/XX#include	<stdio.h>X#include	<math.h>XX#include	<complex.h>XX#define DEGRAD	57.2957795130823208767981548141051703324054724665642X					/* degrees per radian */X#define Abs( x )	((x) < 0 ? -(x) : (x))X#define Max( a, b )	((a) > (b) ? (a) : (b))XXextern void	exit();XX#define	Printf	(void)printfXX#define	TOL	1.0e-10			/* tolerance for checks */XXstatic int	errs = 0;		/* tally errors */XXstatic void	CCheck(), RCheck();Xstatic double	RelDif();XXX/*ARGSUSED*/Xmain( argc, argv )X	int	argc;X	char	*argv[];X	{X	complex a, *bp, *cp;XX	/* CxAllo test */X	bp = CxAllo();X	if ( bp == NULL )X		{X		Printf( "CxAllo failed\n" );X		exit( 1 );X		}XX	/* CxReal, CxImag test */X	CxReal( bp ) = 1.0;X	CxImag( bp ) = 2.0;X	RCheck( "CxReal", CxReal( bp ), 1.0 );X	RCheck( "CxImag", CxImag( bp ), 2.0 );XX	/* CxCons test */X	cp = CxCons( &a, -3.0, -4.0);X	CCheck( "CxCons 1", a, -3.0, -4.0 );X	CCheck( "CxCons 2", *cp, -3.0, -4.0 );XX	/* CxNeg test */X	cp = CxNeg( &a );X	CCheck( "CxNeg 1", a, 3.0, 4.0 );X	CCheck( "CxNeg 2", *cp, 3.0, 4.0 );XX	/* CxCopy test */X	cp = CxCopy( bp, &a );X	(void)CxCons( &a, 1.0, sqrt( 3.0 ) );X	CCheck( "CxCopy 1", *bp, 3.0, 4.0 );X	CCheck( "CxCopy 2", *cp, 3.0, 4.0 );XX	/* CxAmpl, CxPhas test */X	RCheck( "CxAmpl 1", CxAmpl( &a ), 2.0 );X	RCheck( "CxPhas 1", CxPhas( &a ) * DEGRAD, 60.0 );X	/* try other quadrants */X	a.re = -a.re;X	RCheck( "CxAmpl 2", CxAmpl( &a ), 2.0 );X	RCheck( "CxPhas 2", CxPhas( &a ) * DEGRAD, 120.0 );X	a.im = -a.im;X	RCheck( "CxAmpl 3", CxAmpl( &a ), 2.0 );X	RCheck( "CxPhas 3", CxPhas( &a ) * DEGRAD, -120.0 );X	a.re = -a.re;X	RCheck( "CxAmpl 4", CxAmpl( &a ), 2.0 );X	RCheck( "CxPhas 4", CxPhas( &a ) * DEGRAD, -60.0 );X	/* one more for good measure */X	RCheck( "CxAmpl 5", CxAmpl( bp ), 5.0 );XX	/* CxPhsr test */X	cp = CxPhsr( &a, 100.0, -20.0 / DEGRAD );X	RCheck( "CxPhsr 1", CxAmpl( &a ), 100.0 );X	RCheck( "CxPhsr 2", CxPhas( &a ) * DEGRAD, -20.0 );X	RCheck( "CxPhsr 3", CxAmpl( cp ), 100.0 );X	RCheck( "CxPhsr 4", CxPhas( cp ) * DEGRAD, -20.0 );XX	/* CxConj test */X	cp = CxConj( bp );X	CCheck( "CxConj 1", *bp, 3.0, -4.0 );X	CCheck( "CxConj 2", *cp, 3.0, -4.0 );XX	/* CxScal test */X	cp = CxScal( bp, 2.0 );X	CCheck( "CxScal 1", *bp, 6.0, -8.0 );X	CCheck( "CxScal 2", *cp, 6.0, -8.0 );XX	/* CxAdd test */X	cp = CxAdd( CxCons( &a, -4.0, 11.0 ), bp );X	CCheck( "CxAdd 1", a, 2.0, 3.0 );

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区在线观看不卡| 亚洲欧美激情一区二区| 久久久不卡网国产精品二区| 国产亚洲一二三区| 亚洲色欲色欲www在线观看| 亚洲美女精品一区| 亚洲成人高清在线| 国内国产精品久久| 在线亚洲一区二区| 久久久蜜桃精品| 一区二区三区中文在线| 久久精品av麻豆的观看方式| 久久91精品国产91久久小草| 在线免费视频一区二区| 久久亚洲捆绑美女| 亚洲成av人片一区二区梦乃| 国产东北露脸精品视频| 欧美一区二区三区四区高清 | 精品三级av在线| 亚洲免费观看高清完整版在线观看 | 91亚洲国产成人精品一区二三| 日韩精品中文字幕一区| 亚洲一区二区三区中文字幕在线| 国产成人在线观看| 日韩精品一区二区三区老鸭窝| 国产精品超碰97尤物18| 岛国一区二区在线观看| 日韩免费视频线观看| 日韩黄色一级片| 欧美日韩精品一区二区天天拍小说 | 国产一区二区看久久| 精品日韩一区二区| 日韩**一区毛片| 精品少妇一区二区三区日产乱码| 精品一区二区在线视频| 欧美日韩成人一区二区| 亚洲成人手机在线| 日韩一级黄色大片| 国产成人自拍网| 自拍偷拍亚洲综合| 欧美午夜精品理论片a级按摩| 亚洲欧美电影一区二区| 欧美日韩在线播放三区四区| 日韩va欧美va亚洲va久久| 日韩欧美中文字幕一区| 美日韩一区二区| 国产精品天美传媒| 在线不卡a资源高清| 日本网站在线观看一区二区三区 | aaa亚洲精品| 三级久久三级久久| 国产亚洲成av人在线观看导航 | 国产精品视频第一区| 欧美日本国产视频| 国产成人夜色高潮福利影视| 亚洲欧美激情插 | 久久国产福利国产秒拍| 国产精品国产a| 欧美一级片免费看| 白白色亚洲国产精品| 首页国产欧美日韩丝袜| 欧美激情一区二区在线| 欧美大白屁股肥臀xxxxxx| 91精品国产综合久久福利| 成人免费的视频| 久久91精品久久久久久秒播| 亚洲va天堂va国产va久| 国产精品初高中害羞小美女文| 日韩一级完整毛片| 欧美老女人第四色| 日本乱人伦aⅴ精品| 9人人澡人人爽人人精品| 大陆成人av片| 丁香婷婷综合激情五月色| 久久电影网站中文字幕| 日本女人一区二区三区| 日本sm残虐另类| 亚洲成人免费在线观看| 亚洲福利一区二区| 亚洲成人午夜影院| 午夜精品福利一区二区三区蜜桃| 亚洲蜜桃精久久久久久久| 亚洲激情第一区| 亚洲图片欧美综合| 肉色丝袜一区二区| 韩国女主播成人在线| 国产高清不卡二三区| 丁香啪啪综合成人亚洲小说| 97久久精品人人做人人爽50路| 在线观看日韩电影| 538在线一区二区精品国产| 7777精品伊人久久久大香线蕉超级流畅 | 日韩avvvv在线播放| 国产一区三区三区| 日本道精品一区二区三区| 制服丝袜中文字幕亚洲| 国产精品麻豆一区二区| 日韩国产欧美在线观看| 精品一区二区在线免费观看| 国产一区二区三区黄视频| 成人av资源站| 欧美日韩和欧美的一区二区| 欧美曰成人黄网| 欧洲精品中文字幕| 91精品国产欧美一区二区成人| 91在线精品一区二区三区| 在线日韩一区二区| 久久亚洲影视婷婷| 亚洲一区二区三区不卡国产欧美| 日本91福利区| 国产一区二区看久久| 99国产精品久久| 欧美成人猛片aaaaaaa| 中文子幕无线码一区tr | 日韩一区精品视频| 麻豆国产精品一区二区三区 | 国产日韩v精品一区二区| 性做久久久久久免费观看欧美| 另类小说综合欧美亚洲| 99riav一区二区三区| 久久久久久久国产精品影院| 香蕉成人啪国产精品视频综合网| 99久久精品免费看国产| 国产日韩精品一区二区三区在线| 婷婷亚洲久悠悠色悠在线播放| 99精品久久99久久久久| 337p粉嫩大胆色噜噜噜噜亚洲| 天天综合天天做天天综合| 99久久综合国产精品| 国产视频一区在线播放| 国产乱码精品一区二区三区av| 日本精品视频一区二区三区| 亚洲欧美日韩成人高清在线一区| 成人精品国产一区二区4080| 国产精品久久久久久亚洲伦| 久久久不卡网国产精品一区| 五月综合激情婷婷六月色窝| 欧美日韩久久久| 亚洲综合在线视频| 欧美色大人视频| 日韩av一区二区三区四区| 91精品国产一区二区三区蜜臀 | 午夜视频久久久久久| 日韩欧美视频一区| 狠狠色丁香婷综合久久| 中文一区在线播放| 精品国精品国产| www.在线成人| 亚洲妇熟xx妇色黄| 久久综合狠狠综合久久激情| 男女男精品网站| 亚洲欧洲精品天堂一级| 欧美日本一区二区三区四区| 国产精品性做久久久久久| 亚洲国产精品成人久久综合一区| 91亚洲永久精品| 久久成人18免费观看| 亚洲午夜三级在线| 国产精品久久夜| 精品国精品国产| 国产综合色精品一区二区三区| 中文字幕一区二区三区蜜月 | 中文字幕第一区第二区| 欧美人牲a欧美精品| av网站一区二区三区| 久久se精品一区精品二区| 一级特黄大欧美久久久| 中文字幕中文字幕一区| 国产亚洲综合在线| 在线播放91灌醉迷j高跟美女 | 欧美影院一区二区三区| 日韩激情av在线| 午夜国产精品一区| 亚洲成在人线免费| 依依成人精品视频| 一区二区三区精品久久久| 久久精品亚洲国产奇米99| 日韩久久久精品| 久久色在线观看| ...中文天堂在线一区| 国产视频一区二区在线| 久久这里只有精品视频网| 欧美成人aa大片| 久久青草欧美一区二区三区| 色综合天天做天天爱| 在线免费观看成人短视频| 色呦呦日韩精品| 欧美日韩精品一区二区三区| 欧美久久久久久蜜桃| 欧美一卡2卡3卡4卡| 久久久久久久久久久久久久久99| 久久久久久电影| 亚洲免费看黄网站| 天堂成人国产精品一区| 精品制服美女久久| 97久久精品人人爽人人爽蜜臀| 91福利国产精品| 337p粉嫩大胆噜噜噜噜噜91av | 日韩一级欧美一级| 国产精品传媒在线|