We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8f16abb commit f25732eCopy full SHA for f25732e
examples/repeated_squares.rs
@@ -1,13 +1,11 @@
1
-
2
extern crate bigdecimal;
3
4
use bigdecimal::BigDecimal;
5
use std::time::Instant;
6
use std::str::FromStr;
7
8
-fn main()
9
-{
10
- // let mut x = BigDecimal::from(1.1);
+fn main() {
+ // let mut x = BigDecimal::from(1.1);
11
let mut x = BigDecimal::from_str("1.1").unwrap();
12
// for iter in 0..1_000_000 {
13
for iter in 0..26 {
@@ -16,6 +14,10 @@ fn main()
16
14
// x = x.take_and_square();
17
15
let end = Instant::now();
18
let usage = end - start;
19
- println!("iter {} takes {} secs", iter, usage.as_secs() as f32 + usage.subsec_nanos() as f32 / 1.0e9);
+ println!(
+ "iter {} takes {} secs",
+ iter,
20
+ usage.as_secs() as f32 + usage.subsec_nanos() as f32 / 1.0e9
21
+ );
22
}
23
0 commit comments