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

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

?? calc.pm

?? 網頁留言本,比一般的留言簿管用
?? PM
?? 第 1 頁 / 共 4 頁
字號:
  my $mask = $AND_MASK;  my $x1 = $x;  my $y1 = _copy($c,$y);			# make copy  $x = _zero();  my ($b,$xrr,$yrr);  use integer;  while (!_is_zero($c,$x1) && !_is_zero($c,$y1))    {    ($x1, $xr) = _div($c,$x1,$mask);    ($y1, $yr) = _div($c,$y1,$mask);    # make ints() from $xr, $yr    # this is when the AND_BITS are greater tahn $BASE and is slower for    # small (<256 bits) numbers, but faster for large numbers. Disabled    # due to KISS principle#    $b = 1; $xrr = 0; foreach (@$xr) { $xrr += $_ * $b; $b *= $BASE; }#    $b = 1; $yrr = 0; foreach (@$yr) { $yrr += $_ * $b; $b *= $BASE; }#    _add($c,$x, _mul($c, _new( $c, \($xrr & $yrr) ), $m) );        # 0+ due to '&' doesn't work in strings    _add($c,$x, _mul($c, [ 0+$xr->[0] & 0+$yr->[0] ], $m) );    _mul($c,$m,$mask);    }  $x;  }sub _xor  {  my ($c,$x,$y) = @_;  return _zero() if _acmp($c,$x,$y) == 0;	# shortcut (see -and)  my $m = _one(); my ($xr,$yr);  my $mask = $XOR_MASK;  my $x1 = $x;  my $y1 = _copy($c,$y);			# make copy  $x = _zero();  my ($b,$xrr,$yrr);  use integer;  while (!_is_zero($c,$x1) && !_is_zero($c,$y1))    {    ($x1, $xr) = _div($c,$x1,$mask);    ($y1, $yr) = _div($c,$y1,$mask);    # make ints() from $xr, $yr (see _and())    #$b = 1; $xrr = 0; foreach (@$xr) { $xrr += $_ * $b; $b *= $BASE; }    #$b = 1; $yrr = 0; foreach (@$yr) { $yrr += $_ * $b; $b *= $BASE; }    #_add($c,$x, _mul($c, _new( $c, \($xrr ^ $yrr) ), $m) );    # 0+ due to '^' doesn't work in strings    _add($c,$x, _mul($c, [ 0+$xr->[0] ^ 0+$yr->[0] ], $m) );    _mul($c,$m,$mask);    }  # the loop stops when the shorter of the two numbers is exhausted  # the remainder of the longer one will survive bit-by-bit, so we simple  # multiply-add it in  _add($c,$x, _mul($c, $x1, $m) ) if !_is_zero($c,$x1);  _add($c,$x, _mul($c, $y1, $m) ) if !_is_zero($c,$y1);    $x;  }sub _or  {  my ($c,$x,$y) = @_;  return $x if _acmp($c,$x,$y) == 0;		# shortcut (see _and)  my $m = _one(); my ($xr,$yr);  my $mask = $OR_MASK;  my $x1 = $x;  my $y1 = _copy($c,$y);			# make copy  $x = _zero();  my ($b,$xrr,$yrr);  use integer;  while (!_is_zero($c,$x1) && !_is_zero($c,$y1))    {    ($x1, $xr) = _div($c,$x1,$mask);    ($y1, $yr) = _div($c,$y1,$mask);    # make ints() from $xr, $yr (see _and())#    $b = 1; $xrr = 0; foreach (@$xr) { $xrr += $_ * $b; $b *= $BASE; }#    $b = 1; $yrr = 0; foreach (@$yr) { $yrr += $_ * $b; $b *= $BASE; }#    _add($c,$x, _mul($c, _new( $c, \($xrr | $yrr) ), $m) );        # 0+ due to '|' doesn't work in strings    _add($c,$x, _mul($c, [ 0+$xr->[0] | 0+$yr->[0] ], $m) );    _mul($c,$m,$mask);    }  # the loop stops when the shorter of the two numbers is exhausted  # the remainder of the longer one will survive bit-by-bit, so we simple  # multiply-add it in  _add($c,$x, _mul($c, $x1, $m) ) if !_is_zero($c,$x1);  _add($c,$x, _mul($c, $y1, $m) ) if !_is_zero($c,$y1);    $x;  }sub _as_hex  {  # convert a decimal number to hex (ref to array, return ref to string)  my ($c,$x) = @_;  my $x1 = _copy($c,$x);  my $es = '';  my ($xr, $h, $x10000);  if ($] >= 5.006)    {    $x10000 = [ 0x10000 ]; $h = 'h4';    }  else    {    $x10000 = [ 0x1000 ]; $h = 'h3';    }  while (! _is_zero($c,$x1))    {    ($x1, $xr) = _div($c,$x1,$x10000);    $es .= unpack($h,pack('v',$xr->[0]));    }  $es = reverse $es;  $es =~ s/^[0]+//;   # strip leading zeros  $es = '0x' . $es;  \$es;  }sub _as_bin  {  # convert a decimal number to bin (ref to array, return ref to string)  my ($c,$x) = @_;  my $x1 = _copy($c,$x);  my $es = '';  my ($xr, $b, $x10000);  if ($] >= 5.006)    {    $x10000 = [ 0x10000 ]; $b = 'b16';    }  else    {    $x10000 = [ 0x1000 ]; $b = 'b12';    }  while (! _is_zero($c,$x1))    {    ($x1, $xr) = _div($c,$x1,$x10000);    $es .= unpack($b,pack('v',$xr->[0]));    }  $es = reverse $es;  $es =~ s/^[0]+//;   # strip leading zeros  $es = '0b' . $es;  \$es;  }sub _from_hex  {  # convert a hex number to decimal (ref to string, return ref to array)  my ($c,$hs) = @_;  my $mul = _one();  my $m = [ 0x10000 ];				# 16 bit at a time  my $x = _zero();  my $len = length($$hs)-2;  $len = int($len/4);				# 4-digit parts, w/o '0x'  my $val; my $i = -4;  while ($len >= 0)    {    $val = substr($$hs,$i,4);    $val =~ s/^[+-]?0x// if $len == 0;		# for last part only because    $val = hex($val);				# hex does not like wrong chars    $i -= 4; $len --;    _add ($c, $x, _mul ($c, [ $val ], $mul ) ) if $val != 0;    _mul ($c, $mul, $m ) if $len >= 0; 		# skip last mul    }  $x;  }sub _from_bin  {  # convert a hex number to decimal (ref to string, return ref to array)  my ($c,$bs) = @_;  # instead of converting 8 bit at a time, it is faster to convert the  # number to hex, and then call _from_hex.  my $hs = $$bs;  $hs =~ s/^[+-]?0b//;					# remove sign and 0b  my $l = length($hs);					# bits  $hs = '0' x (8-($l % 8)) . $hs if ($l % 8) != 0;	# padd left side w/ 0  my $h = unpack('H*', pack ('B*', $hs));		# repack as hex  return $c->_from_hex(\('0x'.$h));   my $mul = _one();  my $m = [ 0x100 ];				# 8 bit at a time  my $x = _zero();  my $len = length($$bs)-2;  $len = int($len/8);				# 4-digit parts, w/o '0x'  my $val; my $i = -8;  while ($len >= 0)    {    $val = substr($$bs,$i,8);    $val =~ s/^[+-]?0b// if $len == 0;		# for last part only    $val = ord(pack('B8',substr('00000000'.$val,-8,8)));     $i -= 8; $len --;    _add ($c, $x, _mul ($c, [ $val ], $mul ) ) if $val != 0;    _mul ($c, $mul, $m ) if $len >= 0; 		# skip last mul    }  $x;  }############################################################################### special modulus functionssub _modinv  {  # modular inverse  my ($c,$x,$y) = @_;  my $u = _zero($c); my $u1 = _one($c);  my $a = _copy($c,$y); my $b = _copy($c,$x);  # Euclid's Algorithm for bgcd(), only that we calc bgcd() ($a) and the  # result ($u) at the same time. See comments in BigInt for why this works.  my $q;  ($a, $q, $b) = ($b, _div($c,$a,$b));		# step 1  my $sign = 1;  while (!_is_zero($c,$b))    {    my $t = _add($c, 				# step 2:       _mul($c,_copy($c,$u1), $q) ,		#  t =  u1 * q       $u );					#     + u    $u = $u1;					#  u = u1, u1 = t    $u1 = $t;    $sign = -$sign;    ($a, $q, $b) = ($b, _div($c,$a,$b));	# step 1    }  # if the gcd is not 1, then return NaN  return (undef,undef) unless _is_one($c,$a);   $sign = $sign == 1 ? '+' : '-';  ($u1,$sign);  }sub _modpow  {  # modulus of power ($x ** $y) % $z  my ($c,$num,$exp,$mod) = @_;  # in the trivial case,  if (_is_one($c,$mod))    {    splice @$num,0,1; $num->[0] = 0;    return $num;    }  if ((scalar @$num == 1) && (($num->[0] == 0) || ($num->[0] == 1)))    {    $num->[0] = 1;    return $num;    }#  $num = _mod($c,$num,$mod);	# this does not make it faster  my $acc = _copy($c,$num); my $t = _one();  my $expbin = ${_as_bin($c,$exp)}; $expbin =~ s/^0b//;  my $len = length($expbin);  while (--$len >= 0)    {    if ( substr($expbin,$len,1) eq '1')			# is_odd      {      _mul($c,$t,$acc);      $t = _mod($c,$t,$mod);      }    _mul($c,$acc,$acc);    $acc = _mod($c,$acc,$mod);    }  @$num = @$t;  $num;  }############################################################################################################################################################1;__END__=head1 NAMEMath::BigInt::Calc - Pure Perl module to support Math::BigInt=head1 SYNOPSISProvides support for big integer calculations. Not intended to be used by othermodules (except Math::BigInt::Cached). Other modules which sport the samefunctions can also be used to support Math::Bigint, like Math::BigInt::Pari.=head1 DESCRIPTIONIn order to allow for multiple big integer libraries, Math::BigInt wasrewritten to use library modules for core math routines. Any module whichfollows the same API as this can be used instead by using the following:	use Math::BigInt lib => 'libname';'libname' is either the long name ('Math::BigInt::Pari'), or only the shortversion like 'Pari'.=head1 EXPORTThe following functions MUST be defined in order to support the use byMath::BigInt:	_new(string)	return ref to new object from ref to decimal string	_zero()		return a new object with value 0	_one()		return a new object with value 1	_str(obj)	return ref to a string representing the object	_num(obj)	returns a Perl integer/floating point number			NOTE: because of Perl numeric notation defaults,			the _num'ified obj may lose accuracy due to 			machine-dependend floating point size limitations                    	_add(obj,obj)	Simple addition of two objects	_mul(obj,obj)	Multiplication of two objects	_div(obj,obj)	Division of the 1st object by the 2nd			In list context, returns (result,remainder).			NOTE: this is integer math, so no			fractional part will be returned.	_sub(obj,obj)	Simple subtraction of 1 object from another			a third, optional parameter indicates that the params			are swapped. In this case, the first param needs to			be preserved, while you can destroy the second.			sub (x,y,1) => return x - y and keep x intact!	_dec(obj)	decrement object by one (input is garant. to be > 0)	_inc(obj)	increment object by one	_acmp(obj,obj)	<=> operator for objects (return -1, 0 or 1)	_len(obj)	returns count of the decimal digits of the object	_digit(obj,n)	returns the n'th decimal digit of object	_is_one(obj)	return true if argument is +1	_is_zero(obj)	return true if argument is 0	_is_even(obj)	return true if argument is even (0,2,4,6..)	_is_odd(obj)	return true if argument is odd (1,3,5,7..)	_copy		return a ref to a true copy of the object	_check(obj)	check whether internal representation is still intact			return 0 for ok, otherwise error message as stringThe following functions are optional, and can be defined if the underlying libhas a fast way to do them. If undefined, Math::BigInt will use pure Perl (henceslow) fallback routines to emulate these:	_from_hex(str)	return ref to new object from ref to hexadecimal string	_from_bin(str)	return ref to new object from ref to binary string		_as_hex(str)	return ref to scalar string containing the value as			unsigned hex string, with the '0x' prepended.			Leading zeros must be stripped.	_as_bin(str)	Like as_hex, only as binary string containing only			zeros and ones. Leading zeros must be stripped and a			'0b' must be prepended.		_rsft(obj,N,B)	shift object in base B by N 'digits' right			For unsupported bases B, return undef to signal failure	_lsft(obj,N,B)	shift object in base B by N 'digits' left			For unsupported bases B, return undef to signal failure		_xor(obj1,obj2)	XOR (bit-wise) object 1 with object 2			Note: XOR, AND and OR pad with zeros if size mismatches	_and(obj1,obj2)	AND (bit-wise) object 1 with object 2	_or(obj1,obj2)	OR (bit-wise) object 1 with object 2	_mod(obj,obj)	Return remainder of div of the 1st by the 2nd object	_sqrt(obj)	return the square root of object (truncate to int)	_fac(obj)	return factorial of object 1 (1*2*3*4..)	_pow(obj,obj)	return object 1 to the power of object 2	_gcd(obj,obj)	return Greatest Common Divisor of two objects		_zeros(obj)	return number of trailing decimal zeros	_modinv		return inverse modulus	_modpow		return modulus of power ($x ** $y) % $zInput strings come in as unsigned but with prefix (i.e. as '123', '0xabc'or '0b1101').Testing of input parameter validity is done by the caller, so you need notworry about underflow (f.i. in C<_sub()>, C<_dec()>) nor about division byzero or similar cases.The first parameter can be modified, that includes the possibility that youreturn a reference to a completely different object instead. Although keepingthe reference and just changing it's contents is prefered over creating andreturning a different reference.Return values are always references to objects or strings. Exceptions areC<_lsft()> and C<_rsft()>, which return undef if they can not shift theargument. This is used to delegate shifting of bases different than the oneyou can support back to Math::BigInt, which will use some generic code tocalculate the result.=head1 WRAP YOUR OWNIf you want to port your own favourite c-lib for big numbers to theMath::BigInt interface, you can take any of the already existing modules asa rough guideline. You should really wrap up the latest BigInt and BigFloattestsuites with your module, and replace in them any of the following:	use Math::BigInt;by this:	use Math::BigInt lib => 'yourlib';This way you ensure that your library really works 100% within Math::BigInt.=head1 LICENSE This program is free software; you may redistribute it and/or modify it underthe same terms as Perl itself. =head1 AUTHORSOriginal math code by Mark Biggar, rewritten by Tels L<http://bloodgate.com/>in late 2000, 2001.Seperated from BigInt and shaped API with the help of John Peacock.=head1 SEE ALSOL<Math::BigInt>, L<Math::BigFloat>, L<Math::BigInt::BitVect>,L<Math::BigInt::GMP>, L<Math::BigInt::Cached> and L<Math::BigInt::Pari>.=cut

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品欧美一区喷水| 国产一区二区不卡在线| 国产精品一级片在线观看| 99久久99精品久久久久久| 91精品国产综合久久久久久久| 国产色综合一区| 蜜乳av一区二区| 欧美色偷偷大香| 国产精品全国免费观看高清 | 亚洲日韩欧美一区二区在线| 捆绑紧缚一区二区三区视频| 欧美性videosxxxxx| 国产精品久久久久久久岛一牛影视| 青娱乐精品视频在线| 欧美日韩一区久久| 一区二区在线观看视频在线观看| 国产成人av自拍| 精品国产一区二区国模嫣然| 午夜精品久久久久影视| 99热精品一区二区| 国产精品色噜噜| 成人伦理片在线| 久久亚洲二区三区| 美脚の诱脚舐め脚责91| 91精品国产综合久久香蕉的特点| 亚洲国产一区二区三区青草影视| 99免费精品在线观看| 国产欧美一区二区精品性| 国内精品伊人久久久久av影院| 欧美精品v国产精品v日韩精品| 一区二区免费看| 欧美日韩一卡二卡| 亚洲成人资源网| 91精品欧美福利在线观看| 性做久久久久久免费观看| 在线播放/欧美激情| 捆绑变态av一区二区三区| 日韩一区二区在线看片| 久久精品国产在热久久| 制服丝袜激情欧洲亚洲| 午夜欧美电影在线观看| 欧美综合一区二区| 亚洲综合丝袜美腿| 欧美天堂一区二区三区| 日韩一区欧美一区| bt7086福利一区国产| 国产精品久久久久四虎| 99久久国产综合色|国产精品| 欧美麻豆精品久久久久久| 亚洲国产精品av| 91在线观看免费视频| 18成人在线观看| 色悠悠久久综合| 亚洲一区二区欧美| 欧美精品精品一区| 久久精品国产**网站演员| 久久一夜天堂av一区二区三区| 国产美女精品人人做人人爽| 国产日韩欧美激情| 成人免费va视频| 亚洲日本乱码在线观看| 欧美亚洲国产一区二区三区va| 香港成人在线视频| 欧美精品第1页| 国产一区二区在线视频| 国产精品久久久久一区二区三区| 国产精品一卡二卡在线观看| 欧美肥大bbwbbw高潮| 亚洲福利国产精品| 日韩一区二区高清| 国产福利一区二区三区视频 | 粉嫩av一区二区三区在线播放| 欧美国产激情一区二区三区蜜月| 99久久伊人精品| 偷偷要91色婷婷| 久久久久国产精品免费免费搜索| 成人一级视频在线观看| 亚洲免费大片在线观看| 欧美一区二区三区免费观看视频| 亚洲网友自拍偷拍| 久久精品视频免费| 欧美在线观看禁18| 黄一区二区三区| 亚洲美女精品一区| 欧美一卡2卡3卡4卡| 国产成人高清视频| 五月激情综合网| 久久久久久一级片| 欧美一a一片一级一片| 激情小说欧美图片| 亚洲精品高清视频在线观看| 精品国产乱码久久久久久浪潮 | 国产色91在线| 欧美色欧美亚洲另类二区| 国产一级精品在线| 亚洲综合视频网| 国产女人水真多18毛片18精品视频| 91蝌蚪porny| 国产高清精品在线| 视频在线在亚洲| 综合分类小说区另类春色亚洲小说欧美 | 97精品久久久午夜一区二区三区| 亚洲国产成人av网| 综合色中文字幕| 久久午夜色播影院免费高清| 欧美三级三级三级| 国产a久久麻豆| 免费看日韩精品| 一区二区成人在线| 国产精品亲子乱子伦xxxx裸| 精品奇米国产一区二区三区| 91精品办公室少妇高潮对白| thepron国产精品| 国产精品一区二区你懂的| 午夜电影久久久| 亚洲最快最全在线视频| 国产精品福利av| 欧美国产日韩在线观看| 在线电影国产精品| 欧美日韩一区二区三区四区| 色av成人天堂桃色av| 成人国产精品视频| 大胆欧美人体老妇| 高潮精品一区videoshd| 国产乱人伦偷精品视频不卡| 久久99精品久久久| 麻豆精品在线视频| 六月丁香综合在线视频| 男女性色大片免费观看一区二区| 成人欧美一区二区三区1314| 中文字幕乱码久久午夜不卡| 日本一区二区三区在线不卡| 久久精品网站免费观看| 国产欧美日韩亚州综合| 国产日本欧美一区二区| 久久免费视频色| 久久精品一区四区| 国产亚洲欧美日韩日本| 日本一区二区视频在线观看| 国产精品久99| 久久久国产综合精品女国产盗摄| 久久综合色综合88| 国产视频一区二区在线| 亚洲欧洲国产日韩| 亚洲综合一区二区三区| 亚洲电影第三页| 日本亚洲电影天堂| 国产精品一级在线| 91香蕉视频mp4| www.成人在线| 日本高清不卡在线观看| 欧美三级日本三级少妇99| 91精品久久久久久蜜臀| 亚洲精品一区二区三区福利| 国产精品视频一二| 亚洲一区日韩精品中文字幕| 亚洲精品写真福利| 免费欧美日韩国产三级电影| 国产乱子轮精品视频| 丁香亚洲综合激情啪啪综合| 色av成人天堂桃色av| 日韩视频在线你懂得| 麻豆一区二区99久久久久| 91精品国产品国语在线不卡| 91麻豆精品国产综合久久久久久| 日韩欧美一区二区久久婷婷| 中文字幕 久热精品 视频在线| 自拍偷拍亚洲综合| 日韩国产在线观看一区| 亚洲一区中文在线| 国产精品1区2区| 欧美日韩另类国产亚洲欧美一级| 26uuu国产电影一区二区| 国产精品成人免费在线| 日本成人在线看| 91亚洲大成网污www| 91麻豆精品91久久久久同性| 国产亚洲欧美色| 亚洲欧洲在线观看av| 亚洲va欧美va国产va天堂影院| 国产一区日韩二区欧美三区| 在线看国产日韩| 国产清纯在线一区二区www| 天天av天天翘天天综合网| 国产1区2区3区精品美女| 欧美日韩高清一区| 亚洲欧美影音先锋| 精品一区二区三区在线播放| 欧美视频一区二区三区在线观看| 久久综合久久99| 亚洲成av人影院| 欧美日韩夫妻久久| 亚洲免费视频成人| 成人综合日日夜夜| 日韩精品中午字幕| 视频一区二区欧美| 欧美调教femdomvk| ...av二区三区久久精品| 免费观看久久久4p| 91精品国产综合久久久久久久|