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

Inclusion of the faster dot product algorithm #7

Closed
zacmon opened this issue Feb 4, 2020 · 4 comments
Closed

Inclusion of the faster dot product algorithm #7

zacmon opened this issue Feb 4, 2020 · 4 comments

Comments

@zacmon
Copy link

zacmon commented Feb 4, 2020

Hi,

If I have Arb 2.18 installed, will this module incorporate the use of the fast dot product algorithm available in the latest Arb?

Thanks,
Zach

@fredrik-johansson
Copy link
Collaborator

Yes. There is no function at the Python level that exposes the dot product as such (e.g. for computing the dot product of two Python lists of arbs/acbs), but all Arb matrix and polynomial functions will benefit.

@zacmon
Copy link
Author

zacmon commented Feb 4, 2020

Thanks for your quick reply! I do have two lists for which I then use the dot product, but I suppose I can merely have one be an 1xN matrix and the other an Nx1 matrix to employ the newer dot product algorithm.

Perhaps I should open a new issue for my follow-up question which is semi-unrelated, but I was wondering the following: would I benefit from moving a project programmed previously using the mpmath module to the python-flint module? I can't find any speed comparisons between the two, though I have read in your blog and elsewhere that you haven't developed mpmath recently, which leads me to believe I should adopt this wrapper instead. The project I have isn't necessarily complicated, but it does have many multiplications, additions, and powers. I began translating the python code to C with Arb before I realized things got very long very quickly. (To give some background, I'm making a calculator for a function which uses the higher-order chain rule for which I'm coding a look-up table for the partial bell polynomials. I've already coded it in python. And, again, to give an idea, coding the first 24 partial bell polynomials, i.e. 300 expressions, took 7500 lines. I've attached how the (24,12)-th partial bell polynomial appears. You can get an idea of how it might take some time to code this in Arb in C. So using Arb, things become very pedantic with arb_mul, arb_add, arb_power, etc. so I'd like to utilize the native speed of Arb without losing the easiness of coding in python if possible.)
Screen Shot 2020-02-03 at 11 02 45 PM

@fredrik-johansson
Copy link
Collaborator

Yes, probably.

By the way, there is probably a better way to compute the function you are describing. Instead of writing down explicit Bell polynomials, use power series arithmetic to compute derivatives of high order.

@zacmon
Copy link
Author

zacmon commented Feb 4, 2020

Thanks for the recommendation! I'll try that out.

@zacmon zacmon closed this as completed Feb 4, 2020
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