Skip to content

Commit

Permalink
test xlogy with negative x
Browse files Browse the repository at this point in the history
  • Loading branch information
cossio committed May 19, 2020
1 parent 3638892 commit e1bd32f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/basicfuns.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ using StatsFuns, Test
@test iszero(xlogy(0, 1))
@test xlogy(2, 3) 2.0 * log(3.0)
@test_throws DomainError xlogy(1, -1)
# we allow negative `x` (https://github.com/JuliaStats/StatsFuns.jl/pull/95#discussion_r427558736)
@test xlogy(-2, 3) == -xlogy(2, 3)
end

@testset "logistic & logit" begin
Expand Down

0 comments on commit e1bd32f

Please sign in to comment.