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 fix (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 a60b56cdd2
Signed by: cscherrNT
GPG Key ID: 8E2B45BC51A27EA7
2 changed files with 5 additions and 3 deletions

View File

@ -25,7 +25,7 @@ jobs:
# Defaults to "Apply automatic changes"
commit_message: CI cargo fmt
fix:
name: cargo fmt
name: cargo fix
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.

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) {