Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
StarkFishinator committed Oct 5, 2023
1 parent 243629e commit 7edd22d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion src/utils/precision.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ fn exp(x: u256) -> u256 {
//check if x is not too big, but it's already checked in exp 2?
let uLOG2_E = 1_442695040888963407;
let double_unit_product = x * uLOG2_E;
exp2(double_unit_product/1000000000000000000)
exp2(double_unit_product / 1000000000000000000)
}

/// Compute factor from value and divisor with a roundup.
Expand Down
2 changes: 0 additions & 2 deletions tests/utils/test_precision.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,12 @@ fn test_exp() {
let value4: u256 = 0000000000000000000;
let value5: u256 = 1000000000000000000;


let result1 = precision::exp(value1);
let result2 = precision::exp(value2);
let result3 = precision::exp(value3);
let result4 = precision::exp(value4);
let result5 = precision::exp(value5);


assert(result1 == 7389056098930650223, 'should be 7389056098930650223');
assert(result2 == 12182493960703473424, 'should be 12182493960703473424');
assert(result3 == 1777474199233404337144, 'should_1777474199233404337144');
Expand Down

0 comments on commit 7edd22d

Please sign in to comment.