Skip to content

Commit

Permalink
Update core.cairo
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelDkhn committed Oct 22, 2023
1 parent 715a497 commit 214a95f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ fn eq(a: @FP16x16W, b: @FP16x16W) -> bool {

// Calculates the natural exponent of x: e^x
fn exp(a: FP16x16W) -> FP16x16W {
a.sign.print();
return exp2(FixedTrait::new(94548, false) * a); // log2(e) * 2^23 ≈ 12102203
}

Expand All @@ -87,7 +88,6 @@ fn exp2(a: FP16x16W) -> FP16x16W {
}

if (a.sign == true) {
(FixedTrait::ONE() / res_u).print();
return FixedTrait::ONE() / res_u;
} else {
return res_u;
Expand Down

0 comments on commit 214a95f

Please sign in to comment.