algebramix_doc 0.3
|
#include <series_carry_naive.hpp>
Definition at line 390 of file series_carry_naive.hpp.
static S binpow_no_tangent | ( | const S & | me, |
const I & | r | ||
) | [inline, static] |
Definition at line 394 of file series_carry_naive.hpp.
References mmx::coefficients(), default_p_expansion, I, mmx::lshiftz(), M, mmx::rshiftz(), and mmx::square().
Referenced by ser_carry_separable_root_op::def().
{ typedef Scalar_type(S) M; // me^r - r * (me - me[0]) * me[0]^(r-1) - me[0]^r //M me0= me[0]; S me1= lshiftz (me,1); if (r <= 1) return S (0); if (r == 2) return lshiftz (square (rshiftz (me, 1)), 2); I h= r >> 1; S s_h (coefficients (as<default_p_expansion(M)> (integer (h)))); M x= me[0]; S x_h_1= binpow (S(x), h-1); S y= me - me[0]; S z= rshiftz (binpow_no_tangent (me, h), 1); S t0= s_h * y; S t1= square (rshiftz (t0 * x_h_1, 1)); S t2= x_h_1 * z * (t0 + x); S w= lshiftz (square (z) + t1, 2) + lshiftz (t2 + t2, 1); if ((r & 1) == 1) { I h2= h << 1; S s_h2 (coefficients (as<default_p_expansion(M)> (integer (h2)))); w= lshiftz (me * rshiftz (w, 1), 1) + lshiftz (s_h2 * square (rshiftz (y * x_h_1, 1)) * x, 2); } return w; }
static S def | ( | const S & | me, |
const S & | a, | ||
nat | r | ||
) | [inline, static] |
Definition at line 438 of file series_carry_naive.hpp.
References ser_carry_separable_root_op::binpow_no_tangent(), mmx::coefficients(), default_p_expansion, and M.
{ typedef Scalar_type(S) M; if (r == 2) { return ((a - S (me[0]) * me[0] - binpow_no_tangent (me, r)) / M (r)) / me[0]; } S ser_r (coefficients (as<default_p_expansion(M)> (integer (r)))); S me_0_r_1= binpow (S (me[0]), r - 1); S me_0_r= me[0] * me_0_r_1; return (a - me_0_r - binpow_no_tangent (me, r)) / (ser_r * me_0_r_1); }
static generic name | ( | ) | [inline, static] |
Definition at line 419 of file series_carry_naive.hpp.
{ return "separable_root"; }
static nat nr_init | ( | ) | [inline, static] |
Definition at line 435 of file series_carry_naive.hpp.
{ return 1; }
static S op | ( | const S & | x, |
nat | r | ||
) | [inline, static] |
Definition at line 422 of file series_carry_naive.hpp.
References mmx::separable_root().
{ return separable_root (x, r); }
static syntactic op | ( | const syntactic & | x, |
const syntactic & | r | ||
) | [inline, static] |
Definition at line 425 of file series_carry_naive.hpp.
{ return apply ("separable_root", x, r); }
static S op_init | ( | const S & | x, |
nat | r, | ||
const I & | i | ||
) | [inline, static] |
Definition at line 432 of file series_carry_naive.hpp.
References mmx::separable_root_init().
{ return separable_root_init (x, r, i); }
static void set_op | ( | R & | x, |
const S & | y, | ||
nat | r | ||
) | [inline, static] |
Definition at line 429 of file series_carry_naive.hpp.
References mmx::separable_root().
{ x= separable_root (y, r); }