Skip to content

Commit

Permalink
hypot tests for ax > floatmax(ax)/2
Browse files Browse the repository at this point in the history
  • Loading branch information
achuchmala authored and simonbyrne committed Nov 5, 2020
1 parent 3bbedca commit 1113cd8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/math.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1167,6 +1167,10 @@ end
@test hypot(x, x*f) x * hypot(one(f), f) rtol=eps(T)
@test hypot(x, x*f, x*f) x * hypot(one(f), f, f) rtol=eps(T)
end
let x = floatmax(T)/2
@test (@inferred hypot(x, x/4)) x * sqrt(17/BigFloat(16))
@test (@inferred hypot(x, x/4, x/4)) x * sqrt(9/BigFloat(8))
end
end
# hypot on Complex returns Real
@test (@inferred hypot(3, 4im)) === 5.0
Expand Down

0 comments on commit 1113cd8

Please sign in to comment.