9 releases (4 breaking)
new 1.0.0-alpha.1 | Apr 16, 2025 |
---|---|
1.0.0-alpha.0 | Apr 14, 2025 |
0.32.0 | Dec 29, 2024 |
0.31.0 | Nov 4, 2024 |
0.28.0 | Jul 1, 2024 |
#85 in Magic Beans
467 downloads per month
47KB
1K
SLoC
Pallas Math
Crate with all the mathematics functions to support Cardano protocol:
- [] lncf - Approximate
ln(1+x)
forx 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
~3.5–5MB
~90K SLoC