JuliaLang/julia — pull request #2651 by marcusps (2013-03-22 23:37:15+00:00)
Title: RFC: Fix to how eps() works on complex values and types

The current implementation of `eps` on complex values relies on `abs`. This leads to a problem for complex integer types, as `abs` returns a float, and thus `eps(1im)` does not fail like `eps(1)` (and it should). Similarly, `eps(Complex{Float64})` and related expressions simply fail (not being defined).

The changes in this request fix both of these issues, which become important when trying to compare complex floating point values. The docs (`doc/stdlib/base.rst` specifically) mentions only eps of real Float values & types is sensible, but it strikes me as natural to support complex Floats.