docstr: Calculate the residual of a solution to a linear equation system.
  
  r = A*x - b for A*x = b
docstr_tok: ["Calculate","the","residual","of","a","solution","to","a","linear","equation","system",".","r","=","A","*","x","-","b","for","A","*","x","=","b"]
code: def residual(ctx, A, x, b, **kwargs):
      """
      Calculate the residual of a solution to a linear equation system.
  
      r = A*x - b for A*x = b
      """
      oldprec = ctx.prec
      try:
          ctx.prec *= 2
          A, x, b = (
              ctx.matrix(A, **kwargs),
              ctx.matrix(x, **kwargs),
              ctx.matrix(b, **kwargs),
          )
          return A * x - b
      finally:
          ctx.prec = oldprec
  
imports: from copy import copy
  from ..libmp.backend import xrange
label_desc: Use image node_id 10 for calling the LinearAlgebraMethods obj's underlying member method code with example usage: obj.residual(ctx, A, x, b) and returns: unknown