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

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

?? rr.txt

?? 一個比較通用的大數運算庫
?? TXT
?? 第 1 頁 / 共 2 頁
字號:

/**************************************************************************\

MODULE: RR

SUMMARY:

The class RR is used to represent arbitrary-precision floating point
numbers.

The functions in this module guarantee very strong accuracy conditions
which make it easy to reason about the behavior of programs using
these functions.

The arithmetic operations always round their results to p bits, where
p is the current precision.  The current precision can be changed
using RR::SetPrecision(), and can be read using RR::precision().  

The minimum precision that can be set is 53 bits.
The maximum precision is limited only by the word size of the machine.

All arithmetic operations are implemented so that the effect is as if the
result was computed exactly, and then rounded to p bits.  If a number
lies exactly half-way between two p-bit numbers, the "round to even"
rule is used.  So in particular, the computed result will have a relative error
of at most 2^{-p}.


The above rounding rules apply to all arithmetic operations in this
module, except for the following routines:

* The transcendental functions: 
     log, exp, log10, expm1, log1p, pow, sin, cos, ComputePi

* The power function

* The input and ascii to RR conversion functions when using "e"-notation 

For these functions, a very strong accuracy condition is still 
guaranteed: the computed result has a relative error of less than 2^{-p + 1}
(and actually much closer to 2^{-p}).
That is, it is as if the resulted were computed exactly, and then
rounded to one of the two neighboring p-bit numbers (but not necessarily
the closest).

The behavior of all functions in this module is completely platform 
independent: you should get *exactly* the same results on any platform
(the only exception to this rule is the random number generator).

Note that because precision is variable, a number may be computed with
to a high precision p', and then be used as input to an arithmetic operation
when the current precision is p < p'.  
The above accuracy guarantees still apply; in particular, 
no rounding is done until *after* the operation is performed.  

EXAMPLE: If x and y are computed to 200 bits of precision,
and then the precision is set to 100 bits, then x-y will
be computed correctly to 100 bits, even if, say, x and y agree
in their high-order 50 bits.  If x and y had been rounded to
100 bits before the subtraction, then the difference would
only be accurate to 50 bits of precision.

Note that the assignment operator and the copy constructor 
produce *exact* copies of their inputs---they are *never* rounded. 
This is a change in semantics from versions 2.0 and earlier
in which assignment and copy rounded their outputs.
This was deemed a design error and has been changed.

If you want to force rounding to current precision, the easiest
way to do this is with the RR to RR conversion routines:
   conv(x, a);
or
   x = to_RR(a); 
This will round a to current precision and store the result in x.
Note that writing
   x = a + 0;
or
   x = a*1;
also has the same effect.

Unlike IEEE standard floating point, there are no "special values",
like "infinity" or "not a number", nor are there any "denormalized
numbers".  Overflow, underflow, or taking a square root of a negative
number all result in an error being raised.

An RR is represented as a mantissa/exponent pair (x, e), where x is a
ZZ and e is a long.  The real number represented by (x, e) is x * 2^e.
Zero is always represented as (0, 0).  For all other numbers, x is
always odd.


CONVERSIONS AND PROMOTIONS:
The complete set of conversion routines between RR and other types is
documented in the file "conversions.txt". Conversion from any type
to RR always rounds the result to the current precision.

The basic operations also support the notion of "promotions", 
so that they promote a double to an RR.  For example, one can write 
   x = y + 1.5;
where x and y are RR's. One should be aware that these promotions are 
always implemented using the double to RR conversion routine.


SIZE INVARIANT: max(NumBits(x), |e|) < 2^(NTL_BITS_PER_LONG-4)

\**************************************************************************/




#include <NTL/ZZ.h>
#include <NTL/xdouble.h>
#include <NTL/quad_float.h>

class RR {

public:

RR(); // = 0

RR(const RR& a); // copy constructor
RR& operator=(const RR& a); // assignment operator

// NOTE: the copy constructor and assignment operator
// produce exact copies of their inputs, and do not round
// to current precision.  

RR& operator=(double a); // convert and assign

~RR(); // destructor

const ZZ& mantissa() const;  // read the mantissa
long exponent() const;  // read the exponent

static void SetPrecision(long p);  
// set current precision to max(p, 53) bits.
// The default is 150

static long precision();  // read current value of precision

static void SetOutputPrecision(long p);  
// set the number of output decimal digits to max(p, 1).
// The default is 10

static long OutputPrecision();
// read the current number of output decimal digits


};



/**************************************************************************\

                                  Comparison

\**************************************************************************/



// standard comparison operators:

long operator==(const RR& a, const RR& b);
long operator!=(const RR& a, const RR& b);
long operator<=(const RR& a, const RR& b);
long operator>=(const RR& a, const RR& b);
long operator <(const RR& a, const RR& b);
long operator >(const RR& a, const RR& b);


long IsZero(const RR& a); // test if 0
long IsOne(const RR& a); // test if 1

long sign(const RR& a);  // returns sign of a (+1, -1, 0)
long compare(const RR& a, const RR& b); // returns sign(a-b);

// PROMOTIONS: operators ==, ..., > and function compare
// promote double to RR on (a, b).



/**************************************************************************\

                                  Addition

\**************************************************************************/

// operator notation:

RR operator+(const RR& a, const RR& b);
RR operator-(const RR& a, const RR& b);
RR operator-(const RR& a); // unary -

RR& operator+=(RR& x, const RR& a);
RR& operator+=(RR& x, double a);

RR& operator-=(RR& x, const RR& a);
RR& operator-=(RR& x, double a);

RR& operator++(RR& x);  // prefix
void operator++(RR& x, int);  // postfix

RR& operator--(RR& x);  // prefix
void operator--(RR& x, int);  // postfix


// procedural versions:

void add(RR& z, const RR& a, const RR& b); // z = a+b
void sub(RR& z, const RR& a, const RR& b); // z = a-b
void negate(RR& z, const RR& a); // z = -a

// PROMOTIONS: operators +, -, and procedures add, sub promote double
// to RR on (a, b).

void abs(RR& z, const RR& a); // z = |a|
RR fabs(const RR& a);  
RR abs(const RR& a); 


/**************************************************************************\

                                  Multiplication

\**************************************************************************/


// operator notation:

RR operator*(const RR& a, const RR& b);

RR& operator*=(RR& x, const RR& a);
RR& operator*=(RR& x, double a);

// procedural versions:


void mul(RR& z, const RR& a, const RR& b); // z = a*b

void sqr(RR& z, const RR& a); // z = a * a
RR sqr(const RR& a); 

// PROMOTIONS: operator * and procedure mul promote double to RR on (a, b).


/**************************************************************************\

                               Division

\**************************************************************************/


// operator notation:

RR operator/(const RR& a, const RR& b);

RR& operator/=(RR& x, const RR& a);
RR& operator/=(RR& x, double a);


// procedural versions:


void div(RR& z, const RR& a, const RR& b); z = a/b

void inv(RR& z, const RR& a); // z = 1 / a
RR inv(const RR& a); 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
三级精品在线观看| 国产精品久久福利| 日韩不卡一二三区| 91精选在线观看| 美女性感视频久久| 欧美精品一区二区三| 国产麻豆欧美日韩一区| 久久精品亚洲麻豆av一区二区| 国产美女久久久久| 自拍偷在线精品自拍偷无码专区| 91在线观看高清| 午夜成人免费视频| 久久久无码精品亚洲日韩按摩| 国产成人av电影| 亚洲在线视频免费观看| 日韩视频在线你懂得| 风流少妇一区二区| 亚洲成人av资源| 欧美成人精品高清在线播放| 国产精品一区二区x88av| 亚洲欧洲国产日韩| 欧美高清视频不卡网| 国产精品亚洲午夜一区二区三区| 亚洲日本韩国一区| 日韩女优电影在线观看| 国产a区久久久| 丝袜美腿亚洲色图| 中文字幕欧美国产| 欧美日韩精品一区二区天天拍小说| 加勒比av一区二区| 一区二区三区精密机械公司| 精品少妇一区二区三区在线视频| 91视频一区二区| 精品在线一区二区三区| 日韩美女视频一区| 精品久久久久久久久久久久久久久| 91视频观看免费| 久久国产精品99精品国产| 18成人在线观看| 久久综合九色欧美综合狠狠| 欧美手机在线视频| 国产白丝精品91爽爽久久| 日韩精品高清不卡| 伊人一区二区三区| 国产精品美女久久久久久| 欧美一区二区三区男人的天堂| av激情亚洲男人天堂| 激情久久五月天| 丝袜脚交一区二区| 亚洲视频在线观看三级| 精品久久99ma| 日本一区二区高清| 日韩免费高清av| 欧美日韩一级片在线观看| 99麻豆久久久国产精品免费| 国产伦精一区二区三区| 麻豆一区二区在线| 丝袜诱惑制服诱惑色一区在线观看| 亚洲丝袜自拍清纯另类| 久久久欧美精品sm网站| 欧美成人aa大片| 欧美一区二区三区不卡| 欧美日韩一区久久| 欧美亚洲国产怡红院影院| 99精品国产91久久久久久| 成人一区二区三区在线观看| 精品一区二区三区蜜桃| 免费在线观看视频一区| 日韩中文字幕不卡| 午夜精品久久久久久不卡8050| 亚洲最大的成人av| 亚洲黄色小说网站| 一区二区在线观看视频在线观看| 18涩涩午夜精品.www| 椎名由奈av一区二区三区| 国产精品全国免费观看高清| 国产婷婷色一区二区三区四区 | 韩国v欧美v亚洲v日本v| 捆绑变态av一区二区三区| 美女爽到高潮91| 美洲天堂一区二卡三卡四卡视频| 亚洲福中文字幕伊人影院| 亚洲444eee在线观看| 偷窥国产亚洲免费视频| 蜜桃一区二区三区四区| 国产曰批免费观看久久久| 国产精一区二区三区| 国产精品乡下勾搭老头1| 成人一区二区三区在线观看| www.亚洲色图.com| 色综合色综合色综合色综合色综合 | 日韩一本二本av| 日韩欧美卡一卡二| 久久久综合精品| 中文字幕制服丝袜一区二区三区| 亚洲婷婷在线视频| 五月天国产精品| 久久精品99久久久| 国产成人综合视频| 91老师国产黑色丝袜在线| 欧美性色黄大片| 日韩欧美亚洲一区二区| 国产性天天综合网| 亚洲人成网站在线| 日韩国产欧美视频| 国产91精品精华液一区二区三区 | 久久精品国产77777蜜臀| 国产精品1024久久| 在线一区二区观看| 欧美大度的电影原声| 一区二区三区欧美激情| 蜜臀a∨国产成人精品| 成人手机在线视频| 欧美日韩免费电影| 久久男人中文字幕资源站| 亚洲男人电影天堂| 捆绑调教美女网站视频一区| 99视频精品全部免费在线| 91麻豆精品国产91| 亚洲欧洲av另类| 麻豆精品在线观看| 色综合久久综合网| 亚洲精品在线电影| 一区二区在线观看av| 国产一区二区美女| 在线电影院国产精品| 国产精品视频第一区| 日本va欧美va欧美va精品| 99久免费精品视频在线观看 | 久久精品国产澳门| 在线观看日韩电影| 国产情人综合久久777777| 亚洲成a天堂v人片| 国v精品久久久网| 欧美一区二区三区免费视频| 1区2区3区国产精品| 国产乱码精品一区二区三区av | 成人动漫一区二区三区| 欧美美女一区二区在线观看| 国产精品电影一区二区| 国内精品久久久久影院薰衣草| 欧美日韩视频在线观看一区二区三区 | 日本网站在线观看一区二区三区 | 国产91对白在线观看九色| 欧美猛男超大videosgay| 椎名由奈av一区二区三区| 日本韩国欧美国产| 亚洲一区二区欧美日韩| 亚洲成人三级小说| 日韩经典一区二区| 日本三级韩国三级欧美三级| 国产乱码字幕精品高清av| 久久亚洲精品国产精品紫薇| 欧美日韩激情在线| 91麻豆福利精品推荐| 欧美一区二区三区系列电影| 久久精品一区二区三区不卡 | 亚洲五月六月丁香激情| 欧美一级欧美一级在线播放| 91在线高清观看| 日韩欧美成人激情| 国产激情91久久精品导航| 91啦中文在线观看| 久久午夜色播影院免费高清| 99re成人精品视频| 亚洲综合成人在线视频| 久久久久久久久久看片| 日本丶国产丶欧美色综合| 日本va欧美va欧美va精品| 国产精品996| 日韩欧美国产一二三区| 成人va在线观看| 久久久国产一区二区三区四区小说 | 午夜精品在线看| 日韩欧美不卡一区| 日韩欧美高清在线| 在线电影国产精品| 欧美三级电影一区| 欧美性xxxxx极品少妇| 日韩国产成人精品| 欧美影院午夜播放| 欧美另类久久久品| 国产乱子轮精品视频| 亚洲精品高清在线| 91精品黄色片免费大全| 国产精品理论在线观看| 制服视频三区第一页精品| 国产电影精品久久禁18| 99re8在线精品视频免费播放| 免费在线观看日韩欧美| 亚洲色欲色欲www在线观看| caoporm超碰国产精品| 另类人妖一区二区av| 国产精品国产三级国产aⅴ无密码| 91麻豆精东视频| 国产suv精品一区二区三区| 在线一区二区视频| 在线影院国内精品| 欧美xfplay| 亚洲激情校园春色|