File tree 2 files changed +5
-3
lines changed
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " sketches-rust"
3
- version = " 0.2.1 "
3
+ version = " 0.2.2 "
4
4
authors = [" loyispa <litiegen456250@gmail.com>" ]
5
5
license = " Apache-2.0"
6
6
edition = " 2021"
@@ -10,4 +10,5 @@ homepage = "https://github.com/loyispa/sketches-rust"
10
10
description = " Rust implementation of DDSketch."
11
11
exclude = [" .gitignore" ]
12
12
13
- [dependencies ]
13
+ [dependencies ]
14
+ rust-strictmath = " 0.1.1"
Original file line number Diff line number Diff line change 1
1
use crate :: sketch:: { Flag , FlagType } ;
2
2
use crate :: { serde, Error } ;
3
+ use rust_strictmath:: cbrt;
3
4
4
5
use crate :: output:: Output ;
5
6
@@ -159,7 +160,7 @@ impl IndexMapping {
159
160
* CUBICALLY_INTERPOLATED_MAPPING_A
160
161
* CUBICALLY_INTERPOLATED_MAPPING_A
161
162
* ( index - index. floor ( ) ) ;
162
- let p: f64 = ( ( d1 - ( d1 * d1 - 4.0 * d0 * d0 * d0) . sqrt ( ) ) / 2.0 ) . cbrt ( ) ;
163
+ let p: f64 = cbrt ( ( d1 - ( d1 * d1 - 4.0 * d0 * d0 * d0) . sqrt ( ) ) / 2.0 ) ;
163
164
let significand_plus_one: f64 = -( CUBICALLY_INTERPOLATED_MAPPING_B + p + d0 / p)
164
165
/ ( 3.0 * CUBICALLY_INTERPOLATED_MAPPING_A )
165
166
+ 1.0 ;
You can’t perform that action at this time.
0 commit comments