ser_carry_pth_root_reg_op Struct Reference

#include <p_adic.hpp>

List of all members.

Static Public Member Functions


Detailed Description

Definition at line 134 of file p_adic.hpp.


Member Function Documentation

static series<M,V> binpow_no_tangent_normalized ( const series< M, V > &  x0,
const series< M, V > &  x1,
const integer r,
const integer p 
) [inline, static]

Definition at line 138 of file p_adic.hpp.

References binpow(), mmx::coefficients(), default_p_expansion, mmx::lshiftz(), M, mmx::rshiftz(), Series, and mmx::square().

Referenced by ser_carry_pth_root_reg_op::def().

00139                                                                     {
00140     // ((x0 + p * x1)^r - r * p * x1 * x0^(r-1) - x0^r) / p^2
00141     // x1 has valuation at least 1
00142     ASSERT (p >= 3, "bug");
00143     if (r <= 1) return Series (0);
00144 
00145     Series x1_2= lshiftz (square (rshiftz (x1, 1)), 2);
00146     if (r == 2) return x1_2;
00147 
00148     Series s_p   (coefficients (as<default_p_expansion(M)> (p)));
00149 
00150     if ((r & 1) == 1) {
00151       integer h= r - 1;
00152       Series w= binpow_no_tangent_normalized (x0, x1, h, p);
00153       Series s_h (coefficients (as<default_p_expansion(M)> (h)));
00154       Series x0_h_1= binpow (x0, h - 1);
00155       return lshiftz ((x0 + s_p * x1) * rshiftz (w, 1), 1)
00156         + s_h * x0_h_1 * x1_2;
00157     }
00158 
00159     integer h= r >> 1; // r is now even
00160     Series s_h   (coefficients (as<default_p_expansion(M)> (h)));
00161     Series s_p_2 (coefficients (as<default_p_expansion(M)> (square (p))));
00162     Series x0_h_1= binpow (x0, h - 1);
00163     Series x0_h= x0 * x0_h_1;
00164 
00165     Series d= binpow_no_tangent_normalized (x0, x1, h, p);
00166     Series l= s_h * s_p * x0_h_1 * x1 + x0_h;
00167     return lshiftz (rshiftz (d, 1) * (s_p_2 * d + l + l), 1)
00168       + square (s_h * x0_h_1) * x1_2;
00169   }

static series<M,V> def ( const series< M, V > &  me,
const series< M, V > &  a,
const pair< integer, integer > &  p_b0 
) [inline, static]

Definition at line 194 of file p_adic.hpp.

References binpow(), ser_carry_pth_root_reg_op::binpow_no_tangent_normalized(), car(), cdr(), mmx::coefficients(), default_p_expansion, mmx::lshiftz(), M, mmx::rshiftz(), Series, and mmx::square().

00194                                                             {
00195     integer p= car (p_b0); integer b0= cdr (p_b0);
00196     integer q= as<integer> (* M::get_modulus ());
00197     Series ser_p (coefficients (as<default_p_expansion(M)> (p)));
00198     if (p == 2)
00199       return (a - me[0] - ser_p
00200               * (square (Series (me[0]))
00201                  + lshiftz (square (rshiftz (me, 1)), 2)))
00202         / (M(1) + square (ser_p) * me[0]);
00203 
00204     Series tmp= binpow (Series (M(b0) + ser_p * me[0]), p)
00205       - binpow (Series (M(b0)), p);
00206     tmp= q == p ? rshiftz (tmp, 2): rshiftz (M (q / square (p)) * tmp, 1);
00207     Series ap= a - tmp;
00208     Series c= M (b0) + ser_p * me[0];
00209     return (ap - binpow_no_tangent_normalized (c, me - me[0], p, p))
00210       / binpow (c, p - 1); }

static generic name (  )  [inline, static]

Definition at line 171 of file p_adic.hpp.

00171 { return "pth_root"; }

static nat nr_init (  )  [inline, static]

Definition at line 191 of file p_adic.hpp.

00191 { return 1; }

static syntactic op ( const syntactic &  a,
const syntactic &  p 
) [inline, static]

Definition at line 188 of file p_adic.hpp.

00188                                               {
00189     return apply ("pth_root_reg", a, p); }

static series<M,V> op ( const series< M, V > &  a,
const pair< integer, integer > &  p 
) [inline, static]

Definition at line 178 of file p_adic.hpp.

00178                                       {
00179     typedef implementation<series_pth_root_reg,V> Ser;
00180     return Ser::unsep_root_reg (a, p); }

static M op ( const M &  a,
const pair< integer, integer > &  p 
) [inline, static]

Definition at line 174 of file p_adic.hpp.

00174                                  {
00175     (void) p; return a; }

static series<M,V> op_init ( const series< M, V > &  a,
const pair< integer, integer > &  p,
const M &  init 
) [inline, static]

Definition at line 183 of file p_adic.hpp.

00183                                                           {
00184     typedef implementation<series_pth_root_reg,V> Ser;
00185     return Ser::unsep_root_reg (a, p, init); }


The documentation for this struct was generated from the following file:

Generated on 6 Dec 2012 for algebramix by  doxygen 1.6.1