Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
DrunkRandomWalker committed Oct 23, 2023
1 parent d066ae8 commit 1a9586c
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions packages/injective-math/src/fp_decimal/exp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1837,27 +1837,23 @@ mod tests {
// assert_eq!(FPDecimal::E.pow(FPDecimal::TWO.ln()), FPDecimal::must_from_str("2.0"));
assert_eq!(FPDecimal::E.pow_robust(FPDecimal::TWO.ln()), FPDecimal::must_from_str("2.0"));
}

// NOTE: its ok we ignore these two unit tests. they should not be the goal of this crate
/*
#[test]
fn test_25_pow_0_11111() {
let power = FPDecimal::ONE / FPDecimal::from(9 as u128);
let result: FPDecimal = FPDecimal::must_from_str("25.0").ln() * power;
let dampen: FPDecimal = FPDecimal::E.pow_robust(result);
let result = FPDecimal::must_from_str("25.0").ln() * power;
let dampen = FPDecimal::E.pow_robust(result);
// 1.4299640339921836144
// 1.429969148308728735,
assert_eq!(dampen, FPDecimal::must_from_str("1.429969148308728731"));
}
#[test]
fn test_25_pow_0_11111_decimal_lib() {
let x = FPDecimal::ONE / FPDecimal::from(9 as u128);
let a: FPDecimal = FPDecimal::must_from_str("25.0");
let result: FPDecimal = a.pow_robust(x);
let a = FPDecimal::must_from_str("25.0");
let result = a.pow_robust(x);
assert_eq!(result, FPDecimal::must_from_str("1.429969148308728731"));
}
// #[test]
// fn test_negative_25_pow_0_11111_decimal_lib() {
// let x = FPDecimal::ONE / FPDecimal::from(9 as u128);
// let a: FPDecimal = FPDecimal::must_from_str("-25.0");
// let result: FPDecimal = a.pow(x);
// assert_eq!(result, FPDecimal::must_from_str("1.429969148308728731"));
// }
*/
}

0 comments on commit 1a9586c

Please sign in to comment.