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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? multi_float.c

?? 隨機(jī)數(shù)算法
?? C
字號(hào):
/*********************************************************************************																				**		The purpose of this file is basic manipulation of power series.   These are infinite		**    series as opposed to multivariate polynomials of finite degree.  I use the same memory			**    allocation and all degrees start at zero, so offset to a block corresponds to coefficient of x to	**    that power.																		**    Algorithms from Knuth page 506 (section 4.7)											**																				**									Author = Mike Rosing							**									  date  =  April 11, 2000							**																				*********************************************************************************/#include "bigfloat.h"#include "multipoly.h"extern RAMDATA ram_block[];/*  add two power series.  C = A + B	Creates new output space.  takes care of memory management,	but ASSUMES A and B were previously allocated.  	Returns 1 on success, 0 on failure to create C.*/int power_add( MULTIPOLY A, MULTIPOLY B, MULTIPOLY *C){	ELEMENT		i, j, big, small;	MULTIPOLY	result;	FLOAT		*Result, *Aptr, *Bptr;	/*  find out which polynomial is larger and allocate that much space  */	if (A.degree > B.degree)	{		small = B.degree;		big = A.degree;	}	else	{		small = A.degree;		big = B.degree;	}	result.degree = big;	if (!get_space( &result)) return 0;/*  now add the shorter length amounts together  */	Result = Address(result);	Aptr = Address( A);	Bptr = Address( B);	for( i=0; i<= small; i++)	{		add( Aptr, Bptr, Result);		Result++;		Aptr++;		Bptr++;	}	if( A.degree == big)		multi_copy( big - small, Aptr, Result);	else		multi_copy( big - small, Bptr, Result);				/*  take care of memory management  */	if ( A.memdex == C->memdex ) free_space( &A);	if ( B.memdex == C->memdex ) free_space( &B);	C->degree = result.degree;	C->memdex = result.memdex;	return 1;}/*  Multiply two power series. Uses Knuth's construction	from page 506. of Semi Numerical Algorithms (sect. 4.7)	computes C = A*B 	returns 0 if C can't be allocated.*/int power_mul( MULTIPOLY A, MULTIPOLY B, MULTIPOLY *C){	ELEMENT		i, k;	MULTIPOLY	result;	FLOAT		*Aptr, *Bptr, *Result;	FLOAT		temp;	/*  create space for result */	if (A.degree > B.degree)		result.degree = A.degree;	else		result.degree = B.degree;	if ( !get_space( &result) ) return 0;	for( i=0; i<=result.degree; i++)	{		Result = Address(result) + i;		null( Result);		for( k=0; k<=i; k++)		{			if( k <= A.degree) Aptr = Address( A) + k;			else continue;			if( i-k < B.degree) Bptr = Address( B) + i - k;			else continue;			multiply( Aptr, Bptr, &temp);			add( &temp, Result, Result);		}	}	/*  take care of memory management  */	if (A.memdex == C->memdex) free_space( &A);	if (B.memdex == C->memdex) free_space( &B);	C->memdex = result.memdex;	C->degree = result.degree;	return 1;}/*  Subroutine to test if a FLOAT value is 0.	returns 0 if all bits in field are 0, first non-zero ELEMENT	otherwise.*/ELEMENT zero_check( FLOAT *z){	INDEX	i;		if( z->expnt) return z->expnt;	for( i= MS_MNTSA; i >= 0; i++)		if( z->mntsa.e[i] ) return z->mntsa.e[i];	return 0;}	/*  Power series division.  Resulting degree is minimum	degree of two source polynomials.			C = A/B	returns 1 if ok, 0 if no space for C*/int power_div( MULTIPOLY A, MULTIPOLY B,  MULTIPOLY *C){	ELEMENT		n, k;	FLOAT		temp, *Result, *Aptr, *Bptr;	MULTIPOLY	result;/*  check to see if attempting to divide by 0  */	Bptr = Address( B);	if (!zero_check(Bptr)) return (0);/*  create space for result  */	if( A.degree < B.degree) result.degree = A.degree;	else result.degree = B.degree;	if( !get_space(&result)) return 0;/*  do first term  */	Aptr = Address(A);	Bptr = Address( B);	Result = Address( result);	divide( Aptr, Bptr, Result);/*  do rest of terms  */	for( n=1; n<= result.degree; n++)	{		Result = Address( result) + n;		for( k=0; k<n; k++)		{			Aptr = Address( result) +k;			Bptr = Address( B) + n - k;			multiply( Aptr, Bptr, &temp);			add( &temp, Result, Result);		}		Aptr = Address( A) + n;		subtract( Aptr, Result, Result);		Bptr = Address( B);		divide( Result, Bptr, Result);	}		/*  take care of memory management  */	if (A.memdex == C->memdex) free_space( &A);	if (B.memdex == C->memdex) free_space( &B);	C->memdex = result.memdex;	C->degree = result.degree;	return 1;}/*  NOTE: the following routines work with *polynomials*, which are similar	to but not the same as *power series* above.  The main difference is	that in a power series we don't care about higher order terms and let	them fall off the end because they are too small.  With polynomials	we keep every term and assume things get larger.*//*  add two multivariate polynomials.  C = A + B	Creates new output space.  takes care of memory management,	but ASSUMES A and B were previously allocated.  	Returns 1 on success, 0 on failure to create C.*/int multi_add( MULTIPOLY A, MULTIPOLY B, MULTIPOLY *C){	ELEMENT		i, j;	MULTIPOLY	shortpoly, result, longpoly;	FLOAT		*Result, *Aptr, *Bptr;	/*  find out which polynomial is larger and allocate that much space  */	if (A.degree > B.degree)	{		shortpoly.degree = B.degree;		shortpoly.memdex = B.memdex;		longpoly.degree = A.degree;		longpoly.memdex = A.memdex;	}	else	{		shortpoly.degree = A.degree;		shortpoly.memdex = A.memdex;		longpoly.degree = B.degree;		longpoly.memdex = B.memdex;	}	result.degree = longpoly.degree;	if (!get_space( &result)) return 0;/*  now add the shorter length amounts together  */	Result = Address(result);	Aptr = Address( A);	Bptr = Address( B);	for( i=0; i<= shortpoly.degree; i++)	{		add(  Aptr, Bptr, Result);		Result++;		Aptr++;		Bptr++;	}/*  and copy the rest  */	Result = Address(result) + shortpoly.degree + 1;	Aptr = Address(longpoly) + shortpoly.degree + 1;	multi_copy( longpoly.degree - shortpoly.degree, Aptr, Result);	Result = Address(result);	while( result.degree)		if( !zero_check( &Result[result.degree])) result.degree--;		else break;		/*  take care of memory management  */	if ( A.memdex == C->memdex ) free_space( &A);	if ( B.memdex == C->memdex ) free_space( &B);	C->degree = result.degree;	C->memdex = result.memdex;	return 1;}/*  subtract two multivariate polynomials.  C = A - B	Negate all components of B and then call add.  	Simplest way to deal with it.*/int multi_sub( MULTIPOLY A, MULTIPOLY B, MULTIPOLY *C){	INDEX		i;	FLOAT		*ptr;	MULTIPOLY	temp;		multi_dup( B, &temp);	 	for( i=0; i<=temp.degree; i++)	{		ptr = Address(temp) + i;		negate( ptr);	}	multi_add( A, temp, C);	free_space( &temp);	}/*  Multiply two multivariate polynomials. Uses Knuth's construction	from page 399 of Semi Numerical Algorithms (sect. 4.6)	computes C = A*B 	returns 0 if C can't be allocated.*/int multi_mul( MULTIPOLY A, MULTIPOLY B, MULTIPOLY *C){	ELEMENT		i, j, k;	MULTIPOLY	shortmulti, longmulti, result;	FLOAT		*Short, *Long, *Result;	FLOAT		temp;	/*  create space for result using sum of degrees of source polynomials */	result.degree = A.degree + B.degree;	if ( !get_space( &result) ) return 0;	if (A.degree > B.degree)	{		longmulti.memdex = A.memdex;		longmulti.degree = A.degree;		shortmulti.memdex = B.memdex;		shortmulti.degree = B.degree;	}	else	{		longmulti.memdex = B.memdex;		longmulti.degree = B.degree;		shortmulti.memdex = A.memdex;		shortmulti.degree = A.degree;	}	for( k=0; k<shortmulti.degree; k++)	{		Result = Address(result) + k;		null( Result);		for( i=0; i<=k; i++)		{			j = k - i;			Short = Address( shortmulti) + i;			Long = Address( longmulti) + j;			multiply(  Short, Long,  &temp);			Result = Address( result) + k;			add( Result, &temp, Result);		}	}	for( k=shortmulti.degree; k<longmulti.degree; k++)	{		Result = Address(result) + k;		null( Result);		for( i=0; i<=shortmulti.degree; i++)		{			j = k - i;			Short = Address(shortmulti) + i;			Long = Address( longmulti) + j;			multiply( Short,  Long, &temp);			Result = Address( result) + k;			add( Result, &temp, Result);		}	}	for( k=longmulti.degree; k<=result.degree; k++)	{		Result = Address( result) + k;		null( Result);		for( i = k-longmulti.degree; i <= shortmulti.degree;  i++)		{			j = k - i;			Short = Address( shortmulti) + i;			Long = Address( longmulti) + j;			multiply( Short, Long, &temp);			Result = Address( result) + k;			add( Result, &temp, Result);		}	}	Result = Address( result);	while( result.degree)		if( !zero_check( &Result[result.degree])) result.degree--;		else break;	/*  take care of memory management  */	if (A.memdex == C->memdex) free_space( &A);	if (B.memdex == C->memdex) free_space( &B);	C->memdex = result.memdex;	C->degree = result.degree;	return 1;}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕国产一区| 1区2区3区欧美| 91视频xxxx| 国产伦精品一区二区三区免费迷 | 国产一区在线精品| 亚洲成av人**亚洲成av**| 97精品国产露脸对白| 老色鬼精品视频在线观看播放| 亚洲精品中文在线| 久久在线观看免费| 欧美精品乱码久久久久久按摩| 99这里只有精品| 国模少妇一区二区三区| 亚洲成人7777| 欧美激情一区在线观看| 精品国产一区二区三区久久久蜜月 | 在线国产亚洲欧美| 99综合电影在线视频| 国产盗摄精品一区二区三区在线| 日韩和的一区二区| 亚洲超丰满肉感bbw| 亚洲欧洲精品成人久久奇米网| 中文字幕av一区二区三区免费看| 欧美成人欧美edvon| 欧美美女直播网站| 欧美日韩中文一区| 色综合咪咪久久| 91在线观看一区二区| 成人精品视频一区二区三区 | 黄色日韩网站视频| 麻豆91在线播放| 爽爽淫人综合网网站| 亚洲成人高清在线| 日韩国产在线一| 国产精品欧美久久久久无广告| 亚洲精品在线观看视频| 精品国产免费视频| 国产午夜精品在线观看| 国产亚洲精久久久久久| 欧美性生活影院| 欧美丝袜自拍制服另类| 九一九一国产精品| 丰满亚洲少妇av| 欧美精品免费视频| 国产精品午夜在线| 日本系列欧美系列| fc2成人免费人成在线观看播放| 欧美精品久久99久久在免费线| 国产人久久人人人人爽| 亚洲午夜激情网页| 国产91精品一区二区麻豆网站| 欧美日韩综合在线| 日本一区二区视频在线| 婷婷中文字幕综合| 不卡高清视频专区| 日韩欧美国产一区在线观看| 亚洲男人都懂的| 国产精品 日产精品 欧美精品| 欧美日韩五月天| 国产精品每日更新在线播放网址 | 欧洲av一区二区嗯嗯嗯啊| 日韩精品一区二区三区四区| 亚洲同性gay激情无套| 久久69国产一区二区蜜臀| 在线免费观看成人短视频| 国产性做久久久久久| 日本欧美久久久久免费播放网| 成人av午夜电影| 久久男人中文字幕资源站| 日韩高清一区二区| 欧美影片第一页| 亚洲乱码一区二区三区在线观看| 经典一区二区三区| 6080亚洲精品一区二区| 亚洲午夜在线视频| 91在线视频网址| 欧美国产一区二区| 国产精品夜夜爽| 精品卡一卡二卡三卡四在线| 无码av中文一区二区三区桃花岛| 99久久婷婷国产综合精品电影 | 一区二区三区不卡视频| 成人一区二区三区视频 | 日本va欧美va瓶| 欧美日韩一区国产| 亚洲精品久久7777| 99精品视频一区二区三区| 欧美韩日一区二区三区四区| 国产在线观看一区二区| 日韩久久久精品| 久久成人18免费观看| 欧美一区二区三区视频| 性做久久久久久久免费看| 欧美亚洲动漫制服丝袜| 怡红院av一区二区三区| 99精品视频在线观看免费| 国产精品久久久久久久久搜平片 | 麻豆91在线播放| 欧美一级高清片| 久久精品国产亚洲aⅴ| 欧美不卡一区二区三区四区| 久久精品99国产精品| 欧美不卡视频一区| 国产一区二区三区久久悠悠色av| 精品福利视频一区二区三区| 国内久久精品视频| 日本一区二区免费在线观看视频| 国产成人精品免费一区二区| 国产精品久久久久三级| 色综合天天在线| 香港成人在线视频| 日韩一区二区精品在线观看| 青青草视频一区| 久久久久九九视频| 成人手机电影网| 亚洲精品免费在线| 欧美色大人视频| 裸体在线国模精品偷拍| 精品福利二区三区| 成人av手机在线观看| 亚洲美女在线国产| 欧美综合色免费| 亚洲成a人片在线不卡一二三区| 69堂成人精品免费视频| 久久99精品久久久久久动态图 | 精品成人一区二区| 国产91精品入口| 亚洲精品水蜜桃| 6080国产精品一区二区| 国产精品羞羞答答xxdd | 91香蕉视频mp4| 亚洲国产精品人人做人人爽| 欧美一卡二卡三卡| 成人午夜激情影院| 亚洲成国产人片在线观看| 久久综合久色欧美综合狠狠| 成人av电影免费在线播放| 亚洲一二三区在线观看| 欧美不卡在线视频| 91丨porny丨国产入口| 琪琪久久久久日韩精品| 国产欧美日韩中文久久| 欧美主播一区二区三区| 国内精品不卡在线| 亚洲精品综合在线| 欧美电影免费观看高清完整版在| 成人动漫一区二区在线| 午夜激情综合网| 亚洲国产成人自拍| 精品视频一区 二区 三区| 国精产品一区一区三区mba视频| 亚洲天天做日日做天天谢日日欢| 9191成人精品久久| 成人aaaa免费全部观看| 七七婷婷婷婷精品国产| 亚洲三级理论片| 精品国产1区二区| 欧美日韩国产高清一区二区三区| 成人黄页在线观看| 日韩**一区毛片| 亚洲欧美成aⅴ人在线观看| 精品少妇一区二区三区免费观看| 91亚洲永久精品| 国产高清精品在线| 秋霞影院一区二区| 一区二区免费在线| 国产日韩欧美不卡| 欧美成人aa大片| 欧美精品一卡两卡| 99热在这里有精品免费| 韩国v欧美v日本v亚洲v| 丝袜诱惑制服诱惑色一区在线观看| 国产精品久久久久精k8| 精品国产乱码久久久久久蜜臀| 欧美视频一二三区| 色综合久久久久久久| 岛国精品在线观看| 国产一区二区在线视频| 丝袜美腿亚洲一区| 亚洲国产精品久久不卡毛片| 日韩美女久久久| 国产精品入口麻豆原神| 久久毛片高清国产| 日韩欧美国产wwwww| 欧美二区在线观看| 欧美日韩一级片在线观看| 91浏览器入口在线观看| 99久久99久久综合| av一区二区三区四区| 成人亚洲一区二区一| 国产精品一区在线观看乱码 | 日韩欧美另类在线| 宅男在线国产精品| 欧美日韩亚洲综合| 欧美日韩一区二区三区高清| 色天使色偷偷av一区二区| 91视频免费看| 日本乱人伦一区| 色94色欧美sute亚洲线路一ni| 91在线视频18|