Skip to content

Commit

Permalink
add rounding warning
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulk29 committed Oct 14, 2024
1 parent 2f2ca38 commit c442cd1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
24 changes: 12 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion src/blocks/decoder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,12 @@ fn size_path(path: &[&PlanTreeNode], end: &f64) -> TreeNode {
.rev()
.map(|v| {
let v = lp.value(*v);
f64::max(v, 0.8)
if v < 0.8 {
println!("warning: rounding gate to min size");
0.8
} else {
v
}
})
.collect::<Vec<_>>();
values.push(1.);
Expand Down

0 comments on commit c442cd1

Please sign in to comment.