You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 23, 2019. It is now read-only.
The solver can't solve to fractions with variables. For example the speed formula:
s = a/t. So the solver can solve for 'a' -> a = st, but not for 't' -> undefined. Probably because Fraction can't handle variables in the numerator or denominator. This is a serious issue.
let expr = new Expression('s');
expr = expr.multiply('t');
const eq = new Equation(expr, new Expression('a'));
const aAnswer = eq.solveFor('a');
const tAnswer = eq.solveFor('t');
console.log(`a = ${aAnswer}`); // this works: a = st
console.log(`t = ${tAnswer}`); // this fails: t = undefined
The text was updated successfully, but these errors were encountered:
I agree, this is a large problem. It prevents many simple things from being done. For example, simply doing new algebra.Expression("a").divide("b") causes an Uncaught TypeError: Invalid Argument (b): Divisor must be of type Fraction or Integer.
The solver can't solve to fractions with variables. For example the speed formula:
s = a/t. So the solver can solve for 'a' -> a = st, but not for 't' -> undefined. Probably because Fraction can't handle variables in the numerator or denominator. This is a serious issue.
The text was updated successfully, but these errors were encountered: