-
Notifications
You must be signed in to change notification settings - Fork 741
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
Logarithms #268
Comments
I have no plans to do this. I did introduce a logarithm function to bignumber.js so non-integer powers could be calculated, but it required so many changes that I instead released it as a separate library, decimal.js. Dr Ron Knott, author of the excellent Dr Ron Knott's web pages on Mathematics, created a bignumberLIB.js library which adds a log function. See A BigNumber.js Library of Mathematical Constants and Functions. It uses the older bignumber.js API, but I have worked around that and converted it to a module: It still needs some work though as can be seen from running |
If one day you want to consider it again, these are my arguments:
|
Okay, I'll reconsider adding those functions. Thanks for your input. |
any update on this ? @MikeMcl |
Even 3 years later it is needed. |
help us @MikeMcl 🙂 |
I would like to add these functions but my time is very limited at the moment. What is the maximum number of decimal places that would be required for |
@MikeMcl your question is excelent. I think that the decimal places can be a parameter of the function (may be an optional one that by default is the default of the lib). For all, but in special for the TL;DRIn my use case (geometric average = The reason is the unit of the magnitud. dolar + dolar = dolar, dolar - dolar = dolar, but dolar/dolar = real (without unit), that may be a factor, then there is needed more decimal places. But if you are dividing a total in parts you have dolar / real = dolar (that needs 2 decimal places). AppreciationI like a lot your lib. If you add |
Will a logarithm/natural logarithm function be introduced at some point? I am aware
decimal.js
supports these functions, but I prefer the base parsing of this library over the former.The text was updated successfully, but these errors were encountered: