powered by
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.
solve.bigz(a, b, ...) solve.bigq(a, b, ...)
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.
solve
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)
Run the code above in your browser using DataLab