Skip to content

Commit d15cc95

Browse files
committed
remove rust-strictmath
1 parent 2f7a35f commit d15cc95

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

Cargo.toml

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,4 @@ homepage = "https://github.com/loyispa/sketches-rust"
1010
description = "Rust implementation of DDSketch."
1111
exclude = [".gitignore"]
1212

13-
[dependencies]
14-
rust-strictmath = "0.1.1"
13+
[dependencies]

src/index_mapping/mod.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use crate::sketch::{Flag, FlagType};
22
use crate::{serde, Error};
3-
use rust_strictmath::cbrt;
43

54
use crate::output::Output;
65

@@ -160,7 +159,7 @@ impl IndexMapping {
160159
* CUBICALLY_INTERPOLATED_MAPPING_A
161160
* CUBICALLY_INTERPOLATED_MAPPING_A
162161
* (index - index.floor());
163-
let p: f64 = cbrt((d1 - (d1 * d1 - 4.0 * d0 * d0 * d0).sqrt()) / 2.0);
162+
let p: f64 = ((d1 - (d1 * d1 - 4.0 * d0 * d0 * d0).sqrt()) / 2.0).cbrt();
164163
let significand_plus_one: f64 = -(CUBICALLY_INTERPOLATED_MAPPING_B + p + d0 / p)
165164
/ (3.0 * CUBICALLY_INTERPOLATED_MAPPING_A)
166165
+ 1.0;

0 commit comments

Comments
 (0)