# spacepy.toolbox.feq

`spacepy.toolbox.``feq`(x, y, precision=5e-07)

  compare two floating point values if they are equal after: http://www.lahey.com/float.htm

  Deprecated since version 0.2.2: use `numpy.isclose()`; the `rtol` keyword is equivalent to `precision`.

  Parameters
    x float

      a number

    y float or array of floats

      other numbers to compare

    precision float (optional)

      Relative precision for equal (default 0.0000005) Specified as a fraction of the sum of `x` and `y`.

  Returns
    out bool

      True (equal) or False (not equal)

  See also

  `numpy.allclose`
  `numpy.isclose`

  Examples

      >>> import spacepy.toolbox as tb
      >>> x = 1 + 1e-4
      >>> y = 1 + 2e-4
      >>> tb.feq(x, y)
      False
      >>> tb.feq(x, y, 1e-3)
      True