mathhook-core 0.2.0

Core mathematical engine for MathHook - expressions, algebra, and solving
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Simple rational tests

use mathhook_core::prelude::*;

#[test]
fn test_simple_rational() {
    let rational = Expression::number(Number::rational(num_rational::BigRational::new(
        num_bigint::BigInt::from(3),
        num_bigint::BigInt::from(4),
    )));

    let result = rational.simplify();
    println!("Simple rational: 3/4 = {}", result);

    assert!(!result.is_zero());
}