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

Maths functions #79

Open
andy-thomason opened this issue Jul 26, 2021 · 2 comments
Open

Maths functions #79

andy-thomason opened this issue Jul 26, 2021 · 2 comments

Comments

@andy-thomason
Copy link

If you are interested. I have a set of maths functions on BigDecimal that I am using as a reference for libm
generation.

https://github.com/extendr/doctor-syn/blob/main/src/bdmath.rs

These are only references, using MacLaurin series and do not cover all domains, but could
be worked into something more useful.

I've also added a version of "round" that does not panic.

I'm a bit short of time at the moment, but anyone interested, should feel free to cut and paste.

@lukaz-vaultree-com
Copy link

I guess Maclaurin is not fast, right?

@andy-thomason
Copy link
Author

Taylor/Maclaurin series converge slowly except for very small values.

Some of the functions do range reduction to map the inputs to small ones, but
more work is required here for fast convergence.

At the moment, these are just used as references for polynomial
approximations in our CAS package:

https://github.com/doctor-syn/doctor-syn

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

No branches or pull requests

2 participants