Skip to content

Commit 5bbce83

Browse files
committed
few more iszero() fix
1 parent 980e351 commit 5bbce83

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

test/chainrules.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@
209209
# Forward db
210210
_, Δx_inv_db = frule((NoTangent(), 0.0, 1.0, 0.0), beta_inc_inv, a, b, p)
211211
_, Δp_from_db = frule((NoTangent(), 0.0, 1.0, Δx_inv_db[1]), beta_inc, a, b, x_inv)
212-
@test isapprox(Δp_from_db[1], 0.0; rtol=1e-9)
212+
@test iszero(Δp_from_db[1])
213213

214214
# Reverse-mode chain for composition: pullback through f then g
215215
# Pullback of f at (a,b,x_inv)
@@ -221,9 +221,9 @@
221221
ā_total = āf + āg
222222
b̄_total = b̄f + b̄g
223223
p̄_total = p̄g
224-
@test isapprox(ā_total, 0.0; rtol=1e-10)
225-
@test isapprox(b̄_total, 0.0; rtol=1e-10)
226-
@test isapprox(p̄_total, 1.0; rtol=1e-9)
224+
@test iszero(ā_total)
225+
@test iszero(b̄_total)
226+
@test iszero(p̄_total)
227227
end
228228

229229
@testset "incomplete beta: basic test_frule/test_rrule" begin

0 commit comments

Comments
 (0)