Arbitrary-precision real, complex, interval, and numerical computing for MoonBit
| Package | Purpose |
|---|---|
| libmp/mpf | Core arbitrary-precision real representation, arithmetic, conversion, and formatting |
| libmp/mpc | Arbitrary-precision complex arithmetic and special functions |
| libmp/libmpi | Real and complex interval arithmetic, interval functions, and interval matrices |
| libmp/libelefun | Elementary transcendental functions and constants |
| libmp/gammazeta | Gamma, factorial, Bernoulli, psi, harmonic, and zeta families |
| libmp/libhyper | Exponential integrals, trigonometric integrals, AGM, and elliptic integrals |
| libmp/intmath | Integer helpers used by the numerical kernels |
| ctx/mp | High-level precision context, calculus, numerical methods, matrices, and ODE solvers |
moon add CAIMEOX/moon_floatingimport {
"CAIMEOX/moon_floating/ctx/mp",
"CAIMEOX/moon_floating/libmp/mpf",
}let ctx = @mp.new(256, @mpf.round_nearest)
let two = ctx.make_int(2)
let root = ctx.sqrt(two)
println(ctx.to_string(root, dps=50))moon check --target all
moon test --target native
moon fmtArbitrary-precision real, complex, interval, and numerical computing for MoonBit