-
Notifications
You must be signed in to change notification settings - Fork 6
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
using MutableArithmetic api? #118
Comments
I have looked a little bit at this package before and I think it would be very nice to support it! It's a perfect fit for our use case. I would be happy to take a look at this at some point but at the moment I'm focused on, slowly, improving the support for polynomials and series (which would both benefit even more from this than for example |
yeah, this was more of a reminder for us, @saschatimme spearheaded the package so he'll be more qualified to implement this ;) But it's great to hear that you're still working on the package, I've been mostly taken by my other projects for quite a while! |
This only provides support for `sin`, `cos` and `sincos`. The idea was to show how easy it is to add MA support, after which someone else may decide to add more full support, which would be autogenerated, I guess. NB: I think you may also want to overload `MA.operate`. Updates kalmarek#118 Usage example: ```julia-repl julia> using Arblib, MutableArithmetics julia> o() = one(Arb) o (generic function with 1 method) julia> sin(o()) [0.8414709848078965066525023216302989996225630607983710656727517099919104043912 +/- 4.00e-77] julia> operate_to!!(o(), sin, o()) [0.8414709848078965066525023216302989996225630607983710656727517099919104043912 +/- 4.00e-77] julia> sincos(o()) ([0.8414709848078965066525023216302989996225630607983710656727517099919104043912 +/- 4.00e-77], [0.5403023058681397174009366074429766037323104206179222276700972553811003947745 +/- 4.21e-77]) julia> sc = (o(), o()) (1.0000000000000000000000000000000000000000000000000000000000000000000000000000, 1.0000000000000000000000000000000000000000000000000000000000000000000000000000) julia> operate_to!!(sc, sincos, o()) ([0.8414709848078965066525023216302989996225630607983710656727517099919104043912 +/- 4.00e-77], [0.5403023058681397174009366074429766037323104206179222276700972553811003947745 +/- 4.21e-77]) julia> sc ([0.8414709848078965066525023216302989996225630607983710656727517099919104043912 +/- 4.00e-77], [0.5403023058681397174009366074429766037323104206179222276700972553811003947745 +/- 4.21e-77]) ```
so that we can write
MA.@rewrite a + b + c
instead of sequence ofArblib.add!
s.The text was updated successfully, but these errors were encountered: