Merge branch 'master' of https://git.cscherr.de/PlexSheep/rs-basic
Cargo Check, Format, Fix and Test / cargo fmt (push) Has been cancelled Details
Cargo Check, Format, Fix and Test / cargo test (push) Has been cancelled Details
Cargo Check, Format, Fix and Test / cargo check (push) Has been cancelled Details

This commit is contained in:
Christoph J. Scherr 2024-01-12 13:25:37 +01:00
commit 50bba7baf2
Signed by: cscherrNT
GPG Key ID: 8E2B45BC51A27EA7
1 changed files with 4 additions and 2 deletions

View File

@ -25,11 +25,13 @@ fn main() {
let fr = fast_inverse_sqrt(n);
let fdur = start.elapsed();
println!("regular\tinverse square root of {n}: {rr}\t(took {rdur:?})\n\
println!(
"regular\tinverse square root of {n}: {rr}\t(took {rdur:?})\n\
fast \tinverse square root of {n}: {fr}\t(took {fdur:?})\n\n\
The timings are not accurate. Benchmarks show ~170 ps for each.\n\
The CPU has a instruction for sqrt, and 1/x is simple division, so\n\
an algorithm like fast inverse square root can hardly be faster.");
an algorithm like fast inverse square root can hardly be faster."
);
}
fn usage(invocation: &str) {