Skip to content

Commit

Permalink
remove eps() for Complex
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed Mar 27, 2013
1 parent 6fb7fbd commit e36a60e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions base/complex.jl
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,6 @@ isequal(x::Real, z::Complex) = real_valued(z) && isequal(real(z),x)

hash(z::Complex) = (r = hash(real(z)); real_valued(z) ? r : bitmix(r,hash(imag(z))))

eps(z::Complex) = eps(abs(z))

conj(z::Complex) = complex(real(z),-imag(z))
abs(z::Complex) = hypot(real(z), imag(z))
abs2(z::Complex) = real(z)*real(z) + imag(z)*imag(z)
Expand Down
6 changes: 3 additions & 3 deletions test/linalg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ for elty in (Float32, Float64, Complex64, Complex128)

# Test null
a15null = null(a[:,1:5]')
@test_approx_eq_eps norm(a[:,1:5]'a15null) zero(elty) n*eps(one(elty))
@test_approx_eq_eps norm(a15null'a[:,1:5]) zero(elty) n*eps(one(elty))
@test_approx_eq_eps norm(a[:,1:5]'a15null) zero(elty) n*eps(real(one(elty)))
@test_approx_eq_eps norm(a15null'a[:,1:5]) zero(elty) n*eps(real(one(elty)))
@test size(null(b), 2) == 0

# Test pinv
Expand Down Expand Up @@ -366,7 +366,7 @@ for elty in (Float32, Float64, Complex64, Complex128)
end

# issue 1490
@test_approx_eq_eps det(ones(elty, 3,3)) zero(elty) 3*eps(one(elty))
@test_approx_eq_eps det(ones(elty, 3,3)) zero(elty) 3*eps(real(one(elty)))
end

# LAPACK tests
Expand Down

0 comments on commit e36a60e

Please sign in to comment.