diff --git a/lib/FloatedBigDigit.js b/lib/FloatedBigDigit.js index b6f62c9..4de75ea 100644 --- a/lib/FloatedBigDigit.js +++ b/lib/FloatedBigDigit.js @@ -1,7 +1,7 @@ /* FLOATED BIG DIGIT CLASS */ /* CREATE 2021.02.06 */ -/* REVISED 2021.05.21 */ -/* Ver 0.8.5 */ +/* REVISED 2021.05.22 */ +/* Ver 0.8.6 */ /* Original by K-ARAI */ @@ -2568,7 +2568,6 @@ function FloatedBigDigit() { var stop = ( C.compare(floatedBigDigit_LM2)>=0 ); - this.set(1); while(C.compare(1)>0) { this.Mul(F); @@ -3263,8 +3262,6 @@ function FloatedBigDigit() { if(this.checkOver()) return floatedBigDigitERR; - if(stop) return floatedBigDigitERR; - return floatedBigDigitOK; } @@ -3290,6 +3287,8 @@ function FloatedBigDigit() { return floatedBigDigitERR; } + if(F.order()<-floatedBigDigit_order*4/10) return this.SetAsinhB(V); + var C = new FloatedBigDigit(); C.set(0); this.set(1); @@ -3348,8 +3347,6 @@ function FloatedBigDigit() { if(this.checkOver()) return floatedBigDigitERR; - if(stop) return floatedBigDigitERR; - return floatedBigDigitOK; } @@ -3380,10 +3377,12 @@ function FloatedBigDigit() { F.Div(A); - F.add(1); - B.Copy(V); B.minus = false; + + if(F.isOver()) F.Copy(B); + + F.add(1); F.Add(B); this.SetLn(F); @@ -3424,6 +3423,8 @@ function FloatedBigDigit() { return floatedBigDigitERR; } + if(F.order()<-floatedBigDigit_order*4/10) return this.SetAcoshB(V); + var C = new FloatedBigDigit(); C.set(0); this.set(1); @@ -3513,6 +3514,8 @@ function FloatedBigDigit() { B.set(2); A.PowerDiv(B); + if(A.isOver()) A.Copy(V); + A.Add(V); this.SetLn(A);