Skip to content

Commit e9bfa6c

Browse files
committed
WIP #919 use #isZero() instead of isZERO()
1 parent ae97418 commit e9bfa6c

File tree

2 files changed

+30
-5
lines changed
  • symja_android_library/matheclipse-core/src

2 files changed

+30
-5
lines changed

symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/polynomials/longexponent/ExprPolynomial.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public ExprPolynomial(ExprPolynomialRing r) {
115115
*/
116116
public ExprPolynomial(ExprPolynomialRing r, IExpr c, ExpVectorLong e) {
117117
this(r);
118-
if (!c.isZERO()) {
118+
if (!c.isZero()) {
119119
val.put(e, c);
120120
}
121121
}

symja_android_library/matheclipse-core/src/test/java/org/matheclipse/core/system/SolveTest.java

+29-4
Original file line numberDiff line numberDiff line change
@@ -2032,13 +2032,38 @@ public void testIssue914() {
20322032
// + "5243338316756303634461458718861951455543))/Log(7)}}");
20332033
// }
20342034

2035+
// @Test
2036+
// public void testIssue918() {
2037+
// check("Solve({9==x/y, x==pi*y^4},{x,y})", //
2038+
// "{{y->-(-243/2*Pi^2+Sqrt(59049*Pi^4)/2)^(1/3)/(3*Pi),x->(-3*(1/2*(-243*Pi^2+Sqrt(\n" //
2039+
// + "59049*Pi^4)))^(1/3))/Pi},{y->((1-I*Sqrt(3))*(-243*Pi^2+Sqrt(59049*Pi^4))^(1/3))/(\n" //
2040+
// +
2041+
// "6*2^(1/3)*Pi),x->3/2*((1-I*Sqrt(3))*(-243*Pi^2+Sqrt(59049*Pi^4))^(1/3))/(2^(1/3)*Pi)},{y->((\n"
2042+
// //
2043+
// + "1+I*Sqrt(3))*(-243*Pi^2+Sqrt(59049*Pi^4))^(1/3))/(6*2^(1/3)*Pi),x->3/2*((1+I*Sqrt(\n" //
2044+
// + "3))*(-243*Pi^2+Sqrt(59049*Pi^4))^(1/3))/(2^(1/3)*Pi)}}");
2045+
// check("Solve({9==x/y, x==pi*y^4},{x,y}) //N", //
2046+
// "{{y->-(-243/2*Pi^2+Sqrt(59049*Pi^4)/2)^(1/3)/(3*Pi),x->(-3*(1/2*(-243*Pi^2+Sqrt(\n" //
2047+
// + "59049*Pi^4)))^(1/3))/Pi},{y->((1-I*Sqrt(3))*(-243*Pi^2+Sqrt(59049*Pi^4))^(1/3))/(\n" //
2048+
// +
2049+
// "6*2^(1/3)*Pi),x->3/2*((1-I*Sqrt(3))*(-243*Pi^2+Sqrt(59049*Pi^4))^(1/3))/(2^(1/3)*Pi)},{y->((\n"
2050+
// //
2051+
// + "1+I*Sqrt(3))*(-243*Pi^2+Sqrt(59049*Pi^4))^(1/3))/(6*2^(1/3)*Pi),x->3/2*((1+I*Sqrt(\n" //
2052+
// + "3))*(-243*Pi^2+Sqrt(59049*Pi^4))^(1/3))/(2^(1/3)*Pi)}}");
2053+
// check("Solve({x==Pi*y^2, 5==x/y}, {x,y})", //
2054+
// "{{y->5/Pi,x->25/Pi}}");
2055+
// }
2056+
20352057
@Test
2036-
public void testIssue918() {
2037-
check("Solve({x==Pi*y^2, 5==x/y}, {x,y})", //
2038-
"{{y->5/Pi,x->25/Pi}}");
2058+
public void testIssue919() {
2059+
// check(
2060+
// "9810/(2758454771764429/2251799813685248*2*6250796477692329/562949953421312)", //
2061+
// "2072608731373155071447109740789760/5747513123739563366932509455047");
2062+
check(
2063+
"Solve(x==Sqrt(9810/(2758454771764429/2251799813685248*2*6250796477692329/562949953421312)),x)", //
2064+
"{{x->1125899906842624*Sqrt(1635/5747513123739563366932509455047)}}");
20392065
}
20402066

2041-
20422067
/** The JUnit setup method */
20432068
@Override
20442069
public void setUp() {

0 commit comments

Comments
 (0)