Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is preliminary and will be completed by the end of April 2024. Does not currently pass checks due to lines covered in unit testing. Please read notes at the end.
Additions:
E
,LN2
,LN2E
,LN10
, andLN10E
)Issues Addressed:
Drafting this PR for now until Todo list is completed.
Notes on approximations and performance
Nature of approximations
Many of the added functions utilize approximations where the precision is accurate up to ULP (Unit in the last place) of 1. The default precision is 32 decimal places and uses the default rounding mode when returning the result.
The approximations themselves utilize specific formulas and various types of mathematical series. For values close to one after argument reduction, convergence rates are relatively fast, although convergence rates for some functions will never truly converge for irrational numbers, as they can be infinitely approximated to any point of precision. To limit these operations, a tolerance within the desired precision is used as such:
The current
bigO
complexity has yet to be evaluated, but many of the algorithms have been modeled after IEEE 754 and other resources. More optimizations will likely be implemented, and evaluation of performance will follow.