6 releases (3 breaking)

new 0.31.0 Nov 4, 2024
0.30.2 Sep 8, 2024
0.30.1 Aug 25, 2024
0.29.0 Jul 16, 2024
0.28.0 Jul 1, 2024

#780 in Magic Beans

Download history 8/week @ 2024-07-20 124/week @ 2024-08-17 137/week @ 2024-08-24 11/week @ 2024-08-31 161/week @ 2024-09-07 24/week @ 2024-09-14 10/week @ 2024-09-21 12/week @ 2024-09-28 143/week @ 2024-11-02

143 downloads per month

Apache-2.0 and LGPL-3.0-only

47KB
1K SLoC

Pallas Math

Crate with all the mathematics functions to support Cardano protocol:

  • [] lncf - Approximate ln(1+x) for x in 0..infinty.
  • [] cf - Compute continued fraction using max steps or bounded list of a/b factors.
  • [] bound - Simple way to find integer powers that bound x.
  • [] contract - Bisect bounds to find the smallest integer power such that factor^n<=x<factor^(n+1).
  • [] find_e - find n with e^n<=x<e^(n+1).
  • [] ln - Compute natural logarithm via continued fraction, first splitting integral part and then using continued fractions approximation for ln(1+x).
  • [] taylor_exp - Compute exp(x) using Taylor expansion.
  • [] taylor_exp_cmp - Efficient way to compare the result of the Taylor expansion of the exponential function to a threshold value.
  • ...
  • ...

Dependencies

~11MB
~190K SLoC