-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Substitution and negative power returns wrong result #159
Comments
I can't reproduce this. I'm getting 7/27 as the answer, as expected. |
Hmm... I've prepares fiddle: https://jsfiddle.net/uprwaxj7/ Here is screenshot. At bottom right corner is console output: |
OK, I think this is a duplicate of #147. I can't reproduce the problem with top of tree. |
I think there is a problem when the power of the numerator is exactly -1 (when we deal with fraction).
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Substitution of x and negative power returns wrong result.
Steps to Reproduce
const ce = new ComputeEngine.ComputeEngine();
//x=3/7
let a = ce.parse('\frac{x^{-1}}{9}').subs({
x: ce.parse('\frac{3}{7}'),
});
//x=3/7 but included in expression
let b = ce.parse('\frac{(\frac{3}{7})^{-1}}{9}');
console.log(a,b);
Actual Behavior
Substitution returns 21.
Expected Behavior
Should returns 7/27.
The text was updated successfully, but these errors were encountered: