Skip to content

Commit

Permalink
test for NCalc issue 97
Browse files Browse the repository at this point in the history
  • Loading branch information
axkr committed Feb 25, 2020
1 parent 00654cf commit 20ccc13
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19711,6 +19711,23 @@ public void testSolve() {
// check("Solve(x^3 == 1 - I, x)", //
// "{{x->-(-1+I)^(1/3)},{x->(-1+I)^(1/3)},{x->-(-1)^(2/3)*(-1+I)^(1/3)}}");

// https://github.com/tranleduy2000/ncalc/issues/79
// 0x + 50y + 2z = 20
// -6x - 12y + 20z = 8
// 6x + 62y - 18z = 12
check("Solve({50*y+2*z==20, -6*x-12*y+20*z==8, 6*x+62*y-18*z==12},{x,y,z})", //
"{{x->1/75*(-160+256*z),y->1/25*(10-z)}}");
check("Solve({50*y+2*z==20, -6*x-12*y+20*z==8, 6*x+62*y-18*z==12},{x,y,z}) // N", //
"{{x->0.0133333*(-160.0+256.0*z),y->0.04*(10.0-z)}}");

// 0x + 50y + 2z = 20
// -6x - 12y + 20z = 8
// 6x + 62y - 18z = 13
check("Solve({50*y+2*z==20, -6*x-12*y+20*z==8, 6*x+62*y-18*z==13},{x,y,z})", //
"{}");
check("Solve({50*y+2*z==20, -6*x-12*y+20*z==8, 6*x+62*y-18*z==13},{x,y,z}) // N", //
"{}");

check("-(-I*Pi-f(a))/b", //
"(I*Pi+f(a))/b");
check("Solve(3*x^x==7,x)", //
Expand Down

0 comments on commit 20ccc13

Please sign in to comment.