MCPcopy Create free account
hub / github.com/Axect/Peroxide / check_useful

Function check_useful

examples/clippy_verify.rs:231–239  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

229}
230
231fn check_useful() {
232 // useful::max / useful::min (useful.rs:82, 100)
233 let v = vec![3.2_f64, -1.0, 4.4, -7.0, 0.0, 10.5, -10.5, 2.2];
234 print_kv("max(vec)", format!("{:.17e}", max(v.clone())));
235 print_kv("min(vec)", format!("{:.17e}", min(v.clone())));
236 let v2 = vec![1.0_f64, 2.0]; // l == 2 edge case
237 print_kv("max([1,2])", format!("{:.17e}", max(v2.clone())));
238 print_kv("min([1,2])", format!("{:.17e}", min(v2.clone())));
239}
240
241fn main() {
242 println!("== integral ==");

Callers 1

mainFunction · 0.85

Calls 1

print_kvFunction · 0.85

Tested by

no test coverage detected