mathai 0.2.5__tar.gz → 0.2.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mathai-0.2.5 → mathai-0.2.7}/PKG-INFO +1 -1
- {mathai-0.2.5 → mathai-0.2.7}/mathai/univariate_inequality.py +14 -11
- {mathai-0.2.5 → mathai-0.2.7}/mathai.egg-info/PKG-INFO +1 -1
- {mathai-0.2.5 → mathai-0.2.7}/setup.py +1 -1
- {mathai-0.2.5 → mathai-0.2.7}/README.md +0 -0
- {mathai-0.2.5 → mathai-0.2.7}/mathai/__init__.py +0 -0
- {mathai-0.2.5 → mathai-0.2.7}/mathai/apart.py +0 -0
- {mathai-0.2.5 → mathai-0.2.7}/mathai/base.py +0 -0
- {mathai-0.2.5 → mathai-0.2.7}/mathai/console.py +0 -0
- {mathai-0.2.5 → mathai-0.2.7}/mathai/diff.py +0 -0
- {mathai-0.2.5 → mathai-0.2.7}/mathai/expand.py +0 -0
- {mathai-0.2.5 → mathai-0.2.7}/mathai/factor.py +0 -0
- {mathai-0.2.5 → mathai-0.2.7}/mathai/fraction.py +0 -0
- {mathai-0.2.5 → mathai-0.2.7}/mathai/integrate.py +0 -0
- {mathai-0.2.5 → mathai-0.2.7}/mathai/inverse.py +0 -0
- {mathai-0.2.5 → mathai-0.2.7}/mathai/limit.py +0 -0
- {mathai-0.2.5 → mathai-0.2.7}/mathai/linear.py +0 -0
- {mathai-0.2.5 → mathai-0.2.7}/mathai/logic.py +0 -0
- {mathai-0.2.5 → mathai-0.2.7}/mathai/parser.py +0 -0
- {mathai-0.2.5 → mathai-0.2.7}/mathai/printeq.py +0 -0
- {mathai-0.2.5 → mathai-0.2.7}/mathai/simplify.py +0 -0
- {mathai-0.2.5 → mathai-0.2.7}/mathai/structure.py +0 -0
- {mathai-0.2.5 → mathai-0.2.7}/mathai/tool.py +0 -0
- {mathai-0.2.5 → mathai-0.2.7}/mathai/trig.py +0 -0
- {mathai-0.2.5 → mathai-0.2.7}/mathai.egg-info/SOURCES.txt +0 -0
- {mathai-0.2.5 → mathai-0.2.7}/mathai.egg-info/dependency_links.txt +0 -0
- {mathai-0.2.5 → mathai-0.2.7}/mathai.egg-info/requires.txt +0 -0
- {mathai-0.2.5 → mathai-0.2.7}/mathai.egg-info/top_level.txt +0 -0
- {mathai-0.2.5 → mathai-0.2.7}/setup.cfg +0 -0
@@ -365,9 +365,8 @@ def absolute(equation):
|
|
365
365
|
equation = TreeNode("f_or", out2)
|
366
366
|
return equation
|
367
367
|
def handle_sqrt(eq):
|
368
|
-
eq = domain(eq)
|
369
368
|
def helper2(eq):
|
370
|
-
if eq.name in ["f_lt", "f_gt", "f_le", "f_ge"]:
|
369
|
+
if eq.name in ["f_lt", "f_gt", "f_le", "f_ge","f_eq"]:
|
371
370
|
out = []
|
372
371
|
def helper(eq):
|
373
372
|
nonlocal out
|
@@ -376,15 +375,15 @@ def handle_sqrt(eq):
|
|
376
375
|
x = [helper(child) for child in eq.children]
|
377
376
|
helper(eq)
|
378
377
|
for item in out:
|
379
|
-
|
380
|
-
eq2, sgn = inverse(simplify(eq.children[0]), str_form(item), True)
|
381
378
|
n = tree_form("d_1")
|
382
|
-
if
|
383
|
-
|
379
|
+
if eq.name == "f_eq":
|
380
|
+
eq2 = inverse(simplify(eq.children[0]), str_form(item))
|
381
|
+
else:
|
382
|
+
eq2, sgn = inverse(simplify(eq.children[0]), str_form(item), True)
|
383
|
+
if sgn == False:
|
384
|
+
n = tree_form("d_-1")
|
384
385
|
eq3 = simplify(expand(simplify(eq2**2)))
|
385
|
-
|
386
|
-
if "v_" in str_form(eq3) and not (eq2.name == "f_pow" and frac(eq2.children[1]) == Fraction(1,2)):
|
387
|
-
return simplify(TreeNode(eq.name, [simplify(n*item.children[0]-eq3*n), tree_form("d_0")])) & TreeNode("f_ge", [eq2, tree_form("d_0")])
|
386
|
+
|
388
387
|
return simplify(TreeNode(eq.name, [simplify(n*item.children[0]-eq3*n), tree_form("d_0")]))
|
389
388
|
return TreeNode(eq.name, [helper2(child) for child in eq.children])
|
390
389
|
return helper2(eq)
|
@@ -394,9 +393,13 @@ def domain(eq):
|
|
394
393
|
def helper2(eq):
|
395
394
|
nonlocal out
|
396
395
|
if eq.name == "f_pow" and frac(eq.children[1]) is not None and frac(eq.children[1]).denominator == 2:
|
397
|
-
|
396
|
+
if "v_" in str_form(eq.children[0]):
|
397
|
+
out.append(TreeNode("f_ge", [eq.children[0], tree_form("d_0")]))
|
398
|
+
out.append(TreeNode("f_ge", [eq, tree_form("d_0")]))
|
398
399
|
if eq.name == "f_pow" and frac(eq.children[1]) is not None and frac(eq.children[1]) <0:
|
399
|
-
|
400
|
+
tmp = TreeNode("f_eq", [eq.children[0], tree_form("d_0")]).fx("not")
|
401
|
+
if "v_" in str_form(tmp):
|
402
|
+
out.append(tmp)
|
400
403
|
x = [helper2(child) for child in eq.children]
|
401
404
|
helper2(eq)
|
402
405
|
out = list(set([simplify(item) for item in out]))
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|