-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor quo, exp; improve ln, log10, pow
Various functions (quo, ln, log10, pow, exp) have poor performance because they made some arbitrary increases to precision. This commit removes many of those increases and makes some refactors to produce more accurate results faster. Quo is now based on the description given on the GDA site. In addition to being faster, it is not much more accurate, since for some very bad inputs it would return 0 instead of a correct result. This was because the c.Precision*2 + 8 precision calculation would be not precision enough. Exp is now based on the algorithm given in Variable Precision Exponential Function by T. E. Hull and A. Abrham (ACM Transactions on Mathematical Software, Vol 12 #2, pp79–91, ACM, June 1986). The other functions were able to remove some of their various precision increases (but not all, see Ln) with great speed increases.
- Loading branch information
Showing
4 changed files
with
225 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.