Skip to content

Commit

Permalink
Few more math tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kshyatt committed Nov 14, 2015
1 parent 7cda13f commit 3a9e994
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/math.jl
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,15 @@ for T in (Float32, Float64)
@test isnan(log1p(convert(T,NaN)))
@test_throws DomainError log1p(convert(T,-2.0))
end
@test_approx_eq exp10(5) exp10(5.0)

for T in (Int, Float64, BigFloat)
@test_approx_eq deg2rad(T(180)) 1pi
@test_approx_eq deg2rad(T[45, 60]) [pi/T(4), pi/T(3)]
@test_approx_eq rad2deg([pi/T(4), pi/T(3)]) [45, 60]
@test_approx_eq rad2deg(T(1)*pi) 180
@test_approx_eq rad2deg(T(1)) rad2deg(true)
@test_approx_eq deg2rad(T(1)) deg2rad(true)
end

# degree-based trig functions
Expand Down

0 comments on commit 3a9e994

Please sign in to comment.