File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 11[package ]
22name = " sketches-rust"
3- version = " 0.2.1 "
3+ version = " 0.2.2 "
44authors = [
" loyispa <[email protected] >" ]
55license = " Apache-2.0"
66edition = " 2021"
@@ -10,4 +10,5 @@ homepage = "https://github.com/loyispa/sketches-rust"
1010description = " Rust implementation of DDSketch."
1111exclude = [" .gitignore" ]
1212
13- [dependencies ]
13+ [dependencies ]
14+ rust-strictmath = " 0.1.1"
Original file line number Diff line number Diff line change 11use crate :: sketch:: { Flag , FlagType } ;
22use crate :: { serde, Error } ;
3+ use rust_strictmath:: cbrt;
34
45use crate :: output:: Output ;
56
@@ -159,7 +160,7 @@ impl IndexMapping {
159160 * CUBICALLY_INTERPOLATED_MAPPING_A
160161 * CUBICALLY_INTERPOLATED_MAPPING_A
161162 * ( 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 ) ;
163164 let significand_plus_one: f64 = -( CUBICALLY_INTERPOLATED_MAPPING_B + p + d0 / p)
164165 / ( 3.0 * CUBICALLY_INTERPOLATED_MAPPING_A )
165166 + 1.0 ;
You can’t perform that action at this time.
0 commit comments