solmath 0.1.4

Fixed-point financial math for Solana. Black-Scholes, Greeks, IV, NIG pricing, pool math — pure integer arithmetic, no_std, zero dependencies.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
/// Errors returned by fallible solmath operations.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum SolMathError {
    /// Input outside the mathematical domain (e.g. ln of zero or negative)
    DomainError,
    /// Result would overflow the representable range
    Overflow,
    /// Division by zero
    DivisionByZero,
    /// Iterative method did not converge (e.g. implied_vol)
    NoConvergence,
}