rssn 0.2.9

A comprehensive scientific computing library for Rust, aiming for feature parity with NumPy and SymPy.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use crate::symbolic::core::Expr;
use crate::symbolic::numeric::evaluate_numerical;

/// Numerically evaluates a symbolic expression.
/// Takes a raw pointer to an `Expr` as input,
/// and returns an `f64` representing the numerical evaluation of that expression.
#[unsafe(no_mangle)]
pub extern "C" fn rssn_evaluate_numerical_handle(expr: *const Expr) -> f64 {
    let expr_ref = unsafe { &*expr };

    evaluate_numerical(expr_ref).unwrap_or(f64::NAN)
}