mirror of
https://github.com/vale981/arb
synced 2025-03-06 01:41:39 -05:00
improve speed and stability of series composition/reversion by balancing the power table exponents
This commit is contained in:
parent
b3b1041061
commit
ef612c71e2
3 changed files with 3 additions and 4 deletions
|
@ -59,7 +59,7 @@ _fmprb_poly_compose_series_brent_kung(fmprb_ptr res,
|
|||
fmprb_set_ui(A->rows[0] + 0, 1UL);
|
||||
_fmprb_vec_set(A->rows[1], poly2, len2);
|
||||
for (i = 2; i < m; i++)
|
||||
_fmprb_poly_mullow(A->rows[i], A->rows[i-1], n, poly2, len2, n, prec);
|
||||
_fmprb_poly_mullow(A->rows[i], A->rows[(i + 1) / 2], n, A->rows[i / 2], n, n, prec);
|
||||
|
||||
fmprb_mat_mul(C, B, A, prec);
|
||||
|
||||
|
|
|
@ -56,7 +56,8 @@ _fmprb_poly_revert_series_lagrange_fast(fmprb_ptr Qinv, fmprb_srcptr Q, long n,
|
|||
|
||||
_fmprb_poly_inv_series(Ri(1), Q + 1, n - 1, n - 1, prec);
|
||||
for (i = 2; i <= m; i++)
|
||||
_fmprb_poly_mullow(Ri(i), Ri(i-1), n - 1, Ri(1), n - 1, n - 1, prec);
|
||||
_fmprb_poly_mullow(Ri(i), Ri((i + 1) / 2), n - 1, Ri(i / 2), n - 1, n - 1, prec);
|
||||
|
||||
for (i = 2; i < m; i++)
|
||||
fmprb_div_ui(Qinv + i, Ri(i) + i - 1, i, prec);
|
||||
|
||||
|
|
2
todo.txt
2
todo.txt
|
@ -88,8 +88,6 @@
|
|||
This is certainly faster when n is prime, but might be faster for all n,
|
||||
at least if implemented cleverly.
|
||||
|
||||
* Add polynomial squaring code, and exploit in pow, Brent-Kung, etc.
|
||||
|
||||
* Add polynomial mulmid, and use in Newton iteration
|
||||
|
||||
* Tune basecase/Newton selection for exp/sin/cos series (the basecase
|
||||
|
|
Loading…
Add table
Reference in a new issue