📄 ubigintschangehistory.txt
字号:
{Changes Jan 2007 by GDD
* Added variations of "Divide With Remainder" operations to include
DivideRemFloor and DivideRemEuclidean in addition to the standard
DivideRem which uses truncated divide.
* Added "Scratchpad: memory management to improve handling large integers used
witihn routine to hold interim results.
* Moved procedures ShiftLeftBase10, ShiftRightBase10, ShiftLeftNum,
and ShiftRightNum to UBigFloat unit for use in TFloatInt integer class used
by TBigFloat.
}
{additions by Hans Klein 2005(hklein@planet.nl)
Procedures:
pow(const exponent:Int64);
square;
sqroot;
gcd(i2:tinteger);
gcd(i2:Int64);
shiftleft: fast multiplication by base;
modpow(const e,m:Tinteger);
invmod(I2:Tinteger);
Functions:
shiftright: fast division by base; result=remainder;
isodd:boolean;
IsProbablyPrime:boolean;
}
{Changes by Charles Doumar September 2005
Copyright 2005, Charles Doumar
Rewrites or Additions:
ConvertToDecimalString(commas:boolean); (total rewrite)
mult(i2:tinteger) (total rewrite);
mult(const I2:int64); (total rewrite);
square (total rewrite);
Nroot(const root: integer); : find the Nth root of an integer (New)
abscompare(I2:Int64):integer; (new function)
GetBase: integer;
IsZero:boolean;
CompareZero:integer; {Changed to IsZero for consistency
AssignOne;
AssignZero;
ShiftLeftBase10(num: integer);
ShiftRightBase10(num: integer);
ShiftLeftNum(num: integer);
ShiftRightNum(num: integer);
Optimizations:
trim - remove condition from loop, check for sign = 0 when val=0
Assign(Const i2:Int64); - remove MOD statements
Assign(const i2:string); - remove MOD statements
dividerem(const I2:TInteger; var remain:TInteger); - remove MOD statements
pow(const exponent:Int64); - remove MOD, call square, remove div
isodd - remove MOD statement
absadd - removed MOD statements
ConvertToDecimalString - removed Mod Statements
Sqroot; - call new Nroot function
Bug fixes
converttoInt64(n: Int64); - fixed overflow problem, fixed sign problem
invmod - fixed failure to free memory problem
dividerem - change remainder to 0 when divisor is 0
fixed various sign functions....
}
{Changes made by Hans Klein Oct 2005, can be found by searching for hk
added
divide2: handles efficient division by 2.
divmodsmall(int 64, var int64)
assignsmall(int 64)
these two procedures handle integers less than base more efficient;
modified to use these procedures:
assign(int64)
modulo(int64)
modulo(tinteger)
divide(int64)
divide(tinteger)
modified and partially rewritten
modpow
gcd
optimized:
isprobablyprime:
uses divide2
first factors out small factors using divmodsmall
changed setbaseval(1000) to SetbaseVal(100000);
}
{Changes made by Charles Doumar Jan 2005
Added:
AbsoluteValue: make negative number positive
Bug fixes:
DigitCount: Now correctly counts digits...
Assign: Now works with different bases ...
ShiftLeftBase10: ensure digits Array is set...
ShiftRightBase10: correctly count digits...
optimized:
Square: faster
Mult: Faster
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -