solve.bigz                package:gmp                R Documentation

_S_o_l_v_e _a _s_y_s_t_e_m _o_f _e_q_u_a_t_i_o_n

_D_e_s_c_r_i_p_t_i_o_n:

     This generic function solves the equation 'a %*% x = b' for 'x',
     where 'b' can be either a vector or a matrix.

     If a and b are rational, return is a rational matrix.

     If a and b are big integers (of class bigz) solution is in Z/nZ if
     there is a common modulus, or a rational matrix if not.

_U_s_a_g_e:

     solve.bigz(a, b, ...)
     solve.bigq(a, b, ...)

_A_r_g_u_m_e_n_t_s:

     a,b: A element of class bigz or bigq

     ...: Unused

_D_e_t_a_i_l_s:

     It uses the Gauss and trucmuch algo ... to be detailled.

_V_a_l_u_e:

     If a and b are rational, return is a rational matrix.

     If a and b are big integers (of class bigz) solution is in Z/nZ if
     there is a common modulus, of a rational matrix if not.

_A_u_t_h_o_r(_s):

     Antoine Lucas

_S_e_e _A_l_s_o:

     'solve'

_E_x_a_m_p_l_e_s:

      x = matrix(1:4,2,2)
      ## standard solve
      solve(x)

      q = as.bigq(x)
      ## solve with rational
      solve(q)

      z = as.bigz(x)
      modulus(z) <- 7
      ## solve in Z/7Z
      solve(z)

      b = c(1,3)

      solve(q,b)

      solve(z,b)

