Algebraic Factoring
Open
- Dominant language
- Rust
- Stars
- 9
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
```rust
#[test]
fn square_sample_1() {
use crate::base::symbol::Symbol;
let a = &Symbol::variable("a").expr();
let b = &Symbol::variable("b").expr();
let two = &Symbol::variable(2).expr();
assert_eq!(
Factoring::apply(a * a + two * a * b + b * b),
(a + b).pow(two)
);
}
#[test]
fn square_sample_2() {
use crate::base::symbol::Symbol;
let a = &Symbol::variable("a").expr();
let b = &Symbol::variable("b").expr();
let one = &Symbol::variable(1).expr();
let two = &Symbol::variable(2).expr();
assert_eq!(
Factoring::apply(a * a + a * b + a + b),
(a + one) * (a + b)
);
}
```
Contributor guide
Assessment
This issue has not been assessed yet.