class_docstr: Approximates sum by neglecting small terms.
  
  Explanation
  ===========
  
  If terms are expressions which can be determined to be monotonic, then
  bounds for those expressions are added.
  
  Parameters
  ==========
  
  bounds : dict
      Mapping expressions to length 2 tuple of bounds (low, high).
  reltol : number
      Threshold for when to ignore a term. Taken relative to the largest
      lower bound among bounds.
  
  Examples
  ========
  
  >>> from sympy import exp
  >>> from sympy.abc import x, y, z
  >>> from sympy.codegen.rewriting import optimize
  >>> from sympy.codegen.approximations import SumApprox
  >>> bounds = {x: (-1, 1), y: (1000, 2000), z: (-10, 3)}
  >>> sum_approx3 = SumApprox(bounds, reltol=1e-3)
  >>> sum_approx2 = SumApprox(bounds, reltol=1e-2)
  >>> sum_approx1 = SumApprox(bounds, reltol=1e-1)
  >>> expr = 3*(x + y + exp(z))
  >>> optimize(expr, [sum_approx3])
  3*(x + y + exp(z))
  >>> optimize(expr, [sum_approx2])
  3*y + 3*exp(z)
  >>> optimize(expr, [sum_approx1])
  3*y
class_docstr_tok: ["Approximates","sum","by","neglecting","small","terms",".","Explanation","===========","If","terms","are","expressions","which","can","be","determined","to","be","monotonic",",","then","bounds","for","those","expressions","are","added",".","Parameters","==========","bounds",":","dict","Mapping","expressions","to","length","2","tuple","of","bounds","(","low",",","high",")",".","reltol",":","number","Threshold","for","when","to","ignore","a","term",".","Taken","relative","to","the","largest","lower","bound","among","bounds",".","Examples","========",">",">",">","from","sympy","import","exp",">",">",">","from","sympy.abc","import","x",",","y",",","z",">",">",">","from","sympy.codegen.rewriting","import","optimize",">",">",">","from","sympy.codegen.approximations","import","SumApprox",">",">",">","bounds","=","{","x",":","(","-1",",","1",")",",","y",":","(","1000",",","2000",")",",","z",":","(","-10",",","3",")","}",">",">",">","sum_approx3","=","SumApprox","(","bounds",",","reltol=1e-3",")",">",">",">","sum_approx2","=","SumApprox","(","bounds",",","reltol=1e-2",")",">",">",">","sum_approx1","=","SumApprox","(","bounds",",","reltol=1e-1",")",">",">",">","expr","=","3","*","(","x","+","y","+","exp","(","z",")",")",">",">",">","optimize","(","expr",",","[","sum_approx3","]",")","3","*","(","x","+","y","+","exp","(","z",")",")",">",">",">","optimize","(","expr",",","[","sum_approx2","]",")","3","*","y","+","3","*","exp","(","z",")",">",">",">","optimize","(","expr",",","[","sum_approx1","]",")","3","*","y"]
code: def __call__(self, expr):
      return expr.factor().replace(
          self.query, lambda arg: self.value(arg)
      )
  
file_path: sympy/sympy/codegen/approximations.py
imports: import math
  from sympy.sets.sets import Interval
  from sympy.calculus.singularities import is_increasing, is_decreasing
  from sympy.codegen.rewriting import Optimization
  from sympy.core.function import UndefinedFunction
label_desc: Use image node_id 2 for calling the SumApprox obj's underlying member method code with example usage: obj.__call__(expr) and returns: expr