Skip to content

Commit 72e3791

Browse files
committed
Fix numerical rounding errors
1 parent 85de617 commit 72e3791

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/common/sum_tree.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ function Base.get(t::SumTree, v)
135135
parent_ind = 1
136136
leaf_ind = parent_ind
137137
while true
138+
v = min(v, t.tree[parent_ind])
138139
left_child_ind = parent_ind * 2
139140
right_child_ind = left_child_ind + 1
140141
if left_child_ind > length(t.tree)

0 commit comments

Comments
 (0)