class_docstr: Represents the fractional part of x
  
  For real numbers it is defined [1]_ as
  
  .. math::
      x - \left\lfloor{x}\right\rfloor
  
  Examples
  ========
  
  >>> from sympy import Symbol, frac, Rational, floor, I
  >>> frac(Rational(4, 3))
  1/3
  >>> frac(-Rational(4, 3))
  2/3
  
  returns zero for integer arguments
  
  >>> n = Symbol('n', integer=True)
  >>> frac(n)
  0
  
  rewrite as floor
  
  >>> x = Symbol('x')
  >>> frac(x).rewrite(floor)
  x - floor(x)
  
  for complex arguments
  
  >>> r = Symbol('r', real=True)
  >>> t = Symbol('t', real=True)
  >>> frac(t + I*r)
  I*frac(r) + frac(t)
  
  See Also
  ========
  
  sympy.functions.elementary.integers.floor
  sympy.functions.elementary.integers.ceiling
  
  References
  ===========
  
  .. [1] https://en.wikipedia.org/wiki/Fractional_part
  .. [2] https://mathworld.wolfram.com/FractionalPart.html
class_docstr_tok: ["Represents","the","fractional","part","of","x","For","real","numbers","it","is","defined","[","1","]","_","as","..","math",":",":","x","-","\\left\\lfloor","{","x","}","\\right\\rfloor","Examples","========",">",">",">","from","sympy","import","Symbol",",","frac",",","Rational",",","floor",",","I",">",">",">","frac","(","Rational","(","4",",","3",")",")","1\/3",">",">",">","frac","(","-Rational","(","4",",","3",")",")","2\/3","returns","zero","for","integer","arguments",">",">",">","n","=","Symbol","(","'n","'",",","integer=True",")",">",">",">","frac","(","n",")","0","rewrite","as","floor",">",">",">","x","=","Symbol","(","'","x","'",")",">",">",">","frac","(","x",")",".rewrite","(","floor",")","x","-","floor","(","x",")","for","complex","arguments",">",">",">","r","=","Symbol","(","'","r","'",",","real=True",")",">",">",">","t","=","Symbol","(","'t","'",",","real=True",")",">",">",">","frac","(","t","+","I","*","r",")","I","*","frac","(","r",")","+","frac","(","t",")","See","Also","========","sympy.functions.elementary.integers.floor","sympy.functions.elementary.integers.ceiling","References","===========","..","[","1","]","https",":","\/\/en.wikipedia.org\/wiki\/Fractional_part","..","[","2","]","https",":","\/\/mathworld.wolfram.com\/FractionalPart.html"]
code: def eval(cls, arg):
      from sympy.calculus.accumulationbounds import AccumBounds
  
      def _eval(arg):
          if arg in (S.Infinity, S.NegativeInfinity):
              return AccumBounds(0, 1)
          if arg.is_integer:
              return S.Zero
          if arg.is_number:
              if arg is S.NaN:
                  return S.NaN
              elif arg is S.ComplexInfinity:
                  return S.NaN
              else:
                  return arg - floor(arg)
          return cls(arg, evaluate=False)
  
      real, imag = S.Zero, S.Zero
      for t in Add.make_args(arg):
          # Two checks are needed for complex arguments
          # see issue-7649 for details
          if t.is_imaginary or (S.ImaginaryUnit * t).is_real:
              i = im(t)
              if not i.has(S.ImaginaryUnit):
                  imag += i
              else:
                  real += t
          else:
              real += t
  
      real = _eval(real)
      imag = _eval(imag)
      return real + S.ImaginaryUnit * imag
  
imports: from typing import Tuple
  from sympy.core.basic import Basic
  from sympy.core.expr import Expr
  from sympy.core import Add, S
  from sympy.core.evalf import get_integer_part, PrecisionExhausted
  from sympy.core.function import Function
  from sympy.core.logic import fuzzy_or
  from sympy.core.numbers import Integer, int_valued
  from sympy.core.relational import Gt, Lt, Ge, Le, Relational, is_eq
  from sympy.core.sympify import _sympify
  from sympy.functions.elementary.complexes import im, re
  from sympy.multipledispatch import dispatch
label_desc: Use image node_id 1 for calling the frac obj's underlying member method code with example usage: obj.eval(cls, arg) and returns: unknown, cls, AccumBounds, S, S, S, unknown