-
Notifications
You must be signed in to change notification settings - Fork 42
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
[Question] Lacking advanced math features #199
Comments
Hi @JoonasC , I'd definitely say that it is in scope of the library, and BigInteger has at least sqrt implemented, but the rest are unfortunately missing. Currently I don't have time to implement them, so contributions are welcome! As for a workaround, apart from implementing these operations possibly as extension functions or even better contributing them to the code 😃 , I don't have anything concrete to suggest. |
I can't offer any help with this as my kotlin skills aren't good enough, but this java BigDecimal repository might be a useful reference source for anyone willing to have a go: https://github.com/eobermuhlner/big-math |
You've seen the PR, right? The code in there is pretty much inspired by theirs. ;) They too have some very arbitrary magic numbers for how much precision to add for each operation. That's the one thing that made it both hard to understand and unclear how to map to this library. Doubly baffling, because if you go and look at code for something else like bc, the magic numbers for how much precision to add aren't even the same. (So presumably, one of them is wrong? But which one?) Sorting out the actual precision requirements for each function is probably the sole thing making it hard. If someone were to go through and say that so and so function needs so much precision when doing each step, someone else could just go through and churn the code out. |
Here is the pull request in question, #235 which I unfortunately still haven't had time to dive into, as it's related to precision refactoring, and I'm trying to launch an MVP for my startup at the same time. Once again, haven't forgotten about it, just no time :( |
Currently this library is lacking advanced math features, such as: sin, cos, sqrt, nroot, log, etc.
Are these within the scope of this library?
If not, what workaround would you suggest?
The text was updated successfully, but these errors were encountered: