From 956e98498d3bac8354366f50571501352c9869a6 Mon Sep 17 00:00:00 2001 From: JPZEBRA Date: Thu, 27 May 2021 07:15:49 +0900 Subject: [PATCH] Revise Accuracy arcsin revised --- lib/FloatedBigDigit32.cpp | 34 ++++++++++++++++++++++------------ lib/FloatedBigDigit32.h | 2 +- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/lib/FloatedBigDigit32.cpp b/lib/FloatedBigDigit32.cpp index 1947842..6e2d3ea 100644 --- a/lib/FloatedBigDigit32.cpp +++ b/lib/FloatedBigDigit32.cpp @@ -1,6 +1,6 @@ /* FLOATED BIG DIGIT CLASS */ /* CREATE 2021.02.06 */ -/* REVISED 2021.05.26 */ +/* REVISED 2021.05.27 */ /* Ver 0.9.6 */ /* Original by K-ARAI */ @@ -4178,28 +4178,38 @@ int FloatedBigDigit32::SetAsin_boost(FloatedBigDigit32* V) { FloatedBigDigit32* F = new FloatedBigDigit32(); FloatedBigDigit32* A = new FloatedBigDigit32(); FloatedBigDigit32* B = new FloatedBigDigit32(); + FloatedBigDigit32* C = new FloatedBigDigit32(); + + bool rf = V->minus; F->Copy(V); + F->Abs(); - A->Copy(V); - A->Mul(V); - A->sub(1); - A->Sig(); + A->set(1); + A->Sub(F); - B->set(2); - A->PowerDiv(B); - A->add(1); + B->set(1); + B->Add(F); - F->Div(A); + C->set(2); + A->PowerDiv(C); + B->PowerDiv(C); - this->SetAtan_boost(F); - this->mul(2); + A->Mul(B); + int ret = C->SetAsin(A); + + this->SetPI(); + this->div(2); + this->Sub(C); + + this->minus = rf; delete F; delete A; delete B; + delete C; - return floatedBigDigitERR; + return ret; } diff --git a/lib/FloatedBigDigit32.h b/lib/FloatedBigDigit32.h index a174401..5f51623 100644 --- a/lib/FloatedBigDigit32.h +++ b/lib/FloatedBigDigit32.h @@ -1,6 +1,6 @@ /* FLOATED BIG DIGIT CLASS */ /* CREATE 2021.02.06 */ -/* REVISED 2021.05.26 */ +/* REVISED 2021.05.27 */ /* Ver 0.9.6 */ /* Original by K-ARAI */