Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add implementation of natural exponent function (Taylor, Hull-Abraham) #229

Merged
merged 5 commits into from
Oct 11, 2021

Conversation

mwoss
Copy link
Member

@mwoss mwoss commented May 30, 2021

PR contains an implementation of two approaches for calculating the natural exponent of decimal: Hull-Abraham algorithm and Taylor series expansion.
Hull-Abraham implementation is based on implementation from cockroachdb/apd. Their implementation can be found here: apd/context.go. Many thanks to Cockroach devs who created such an amazing library :3

Additionally, the NumDigits method was added, as such functionality was needed for the first algorithm.

I know both algorithms can be optimized, but I will work on this in the future. As it's better to have slow, but working new functionality, than having nothing in my opinion. NumDigits method needs the most attention here I guess.

@mwoss mwoss mentioned this pull request Jul 1, 2021
@mwoss mwoss mentioned this pull request Sep 8, 2021
@mwoss mwoss merged commit 4654447 into master Oct 11, 2021
@mwoss mwoss deleted the exp-func branch October 11, 2021 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant