Skip to content

Commit

Permalink
fixed lint
Browse files Browse the repository at this point in the history
  • Loading branch information
DrunkRandomWalker committed Sep 20, 2023
1 parent 38c9cee commit 3e317be
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/injective-math/src/fp_decimal/exp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ impl FPDecimal {
Ordering::Less => {
// taylor expansion approximation of exponentation compuation with float number exponent
// NOTE: only accurate for 1,3,5,7,11, and combinations of these numbers
if let Some(_) = a.log2() {
if a.log2().is_some() {
if ((FPDecimal::reciprocal(b) % FPDecimal::TWO).int() - FPDecimal::ONE).abs() <= FPDecimal::must_from_str("0.000001")
{
let mut tmp_b = FPDecimal::reciprocal(b).int();
Expand All @@ -419,7 +419,7 @@ impl FPDecimal {
};
}

if let Some(_) = a.log3() {
if a.log3().is_some() {
if ((FPDecimal::reciprocal(b) % FPDecimal::TWO).int() - FPDecimal::ONE).abs() <= FPDecimal::must_from_str("0.000001")
{
let mut tmp_b = FPDecimal::reciprocal(b).int();
Expand All @@ -439,7 +439,7 @@ impl FPDecimal {
};
}

if let Some(_) = a.log5() {
if a.log5().is_some() {
if ((FPDecimal::reciprocal(b) % FPDecimal::TWO).int() - FPDecimal::ONE).abs() <= FPDecimal::must_from_str("0.000001")
{
let mut tmp_b = FPDecimal::reciprocal(b).int();
Expand All @@ -459,7 +459,7 @@ impl FPDecimal {
};
}

if let Some(_) = a.log7() {
if a.log7().is_some() {
if ((FPDecimal::reciprocal(b) % FPDecimal::TWO).int() - FPDecimal::ONE).abs() <= FPDecimal::must_from_str("0.000001")
{
let mut tmp_b = FPDecimal::reciprocal(b).int();
Expand All @@ -479,7 +479,7 @@ impl FPDecimal {
};
}

if let Some(_) = a.log11() {
if a.log11().is_some() {
if ((FPDecimal::reciprocal(b) % FPDecimal::TWO).int() - FPDecimal::ONE).abs() <= FPDecimal::must_from_str("0.000001")
{
let mut tmp_b = FPDecimal::reciprocal(b).int();
Expand Down

0 comments on commit 3e317be

Please sign in to comment.