expand

Function expand 

Source
pub fn expand(expr: &Expression) -> Expression
Expand description

Expand polynomial expression

§Mathematical Definition

expand((x+1)²) = x² + 2x + 1

§Arguments

  • expr - Expression to expand

§Returns

Expanded expression

§Examples

use mathhook_core::functions::polynomials::polynomial_eval::expand;
use mathhook_core::expr;

let result = expand(&expr!(1));
assert_eq!(result, expr!(1));