mathai 0.2.4__tar.gz → 0.2.5__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.
Files changed (29) hide show
  1. {mathai-0.2.4 → mathai-0.2.5}/PKG-INFO +1 -1
  2. {mathai-0.2.4 → mathai-0.2.5}/mathai/simplify.py +5 -2
  3. {mathai-0.2.4 → mathai-0.2.5}/mathai/univariate_inequality.py +3 -3
  4. {mathai-0.2.4 → mathai-0.2.5}/mathai.egg-info/PKG-INFO +1 -1
  5. {mathai-0.2.4 → mathai-0.2.5}/setup.py +1 -1
  6. {mathai-0.2.4 → mathai-0.2.5}/README.md +0 -0
  7. {mathai-0.2.4 → mathai-0.2.5}/mathai/__init__.py +0 -0
  8. {mathai-0.2.4 → mathai-0.2.5}/mathai/apart.py +0 -0
  9. {mathai-0.2.4 → mathai-0.2.5}/mathai/base.py +0 -0
  10. {mathai-0.2.4 → mathai-0.2.5}/mathai/console.py +0 -0
  11. {mathai-0.2.4 → mathai-0.2.5}/mathai/diff.py +0 -0
  12. {mathai-0.2.4 → mathai-0.2.5}/mathai/expand.py +0 -0
  13. {mathai-0.2.4 → mathai-0.2.5}/mathai/factor.py +0 -0
  14. {mathai-0.2.4 → mathai-0.2.5}/mathai/fraction.py +0 -0
  15. {mathai-0.2.4 → mathai-0.2.5}/mathai/integrate.py +0 -0
  16. {mathai-0.2.4 → mathai-0.2.5}/mathai/inverse.py +0 -0
  17. {mathai-0.2.4 → mathai-0.2.5}/mathai/limit.py +0 -0
  18. {mathai-0.2.4 → mathai-0.2.5}/mathai/linear.py +0 -0
  19. {mathai-0.2.4 → mathai-0.2.5}/mathai/logic.py +0 -0
  20. {mathai-0.2.4 → mathai-0.2.5}/mathai/parser.py +0 -0
  21. {mathai-0.2.4 → mathai-0.2.5}/mathai/printeq.py +0 -0
  22. {mathai-0.2.4 → mathai-0.2.5}/mathai/structure.py +0 -0
  23. {mathai-0.2.4 → mathai-0.2.5}/mathai/tool.py +0 -0
  24. {mathai-0.2.4 → mathai-0.2.5}/mathai/trig.py +0 -0
  25. {mathai-0.2.4 → mathai-0.2.5}/mathai.egg-info/SOURCES.txt +0 -0
  26. {mathai-0.2.4 → mathai-0.2.5}/mathai.egg-info/dependency_links.txt +0 -0
  27. {mathai-0.2.4 → mathai-0.2.5}/mathai.egg-info/requires.txt +0 -0
  28. {mathai-0.2.4 → mathai-0.2.5}/mathai.egg-info/top_level.txt +0 -0
  29. {mathai-0.2.4 → mathai-0.2.5}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: mathai
3
- Version: 0.2.4
3
+ Version: 0.2.5
4
4
  Summary: Mathematics solving Ai tailored to NCERT
5
5
  Home-page: https://github.com/infinity390/mathai4
6
6
  Author: educated indians are having a low iq and are good for nothing
@@ -146,14 +146,17 @@ def solve(eq, specialfx=False):
146
146
  return dowhile(eq, _solve)
147
147
  def solve2(eq):
148
148
  return solve(eq, True)
149
- def clear_div(eq):
149
+ def clear_div(eq, denom=False):
150
150
  lst = factor_generation(eq)
151
151
  if tree_form("d_0") in lst:
152
152
  return tree_form("d_0")
153
153
  lst3 = [item for item in lst if "v_" not in str_form(item) and compute(item) < 0]
154
+
154
155
  sign = True
155
156
  if len(lst3) % 2 == 1:
156
157
  sign = False
158
+ if denom:
159
+ return eq if sign else -eq, sign
157
160
  lst = [item for item in lst if not(item.name == "f_pow" and frac(item.children[1]) is not None and frac(item.children[1]) == -1)]
158
161
 
159
162
  lst2 = [item for item in lst if "v_" in str_form(item)]
@@ -168,7 +171,7 @@ def simplify(eq):
168
171
  return TreeNode(eq.name, [simplify(child) for child in eq.children])
169
172
 
170
173
  if eq.name in ["f_lt", "f_gt", "f_le", "f_ge", "f_eq"]:
171
- tmp, sign = clear_div(simplify(eq.children[0]-eq.children[1]))
174
+ tmp, sign = clear_div(simplify(eq.children[0]-eq.children[1]), eq.name != "f_eq")
172
175
  name2 = eq.name
173
176
  if not sign:
174
177
  name2 = {"f_lt":"f_gt", "f_gt":"f_lt", "f_eq":"f_eq", "f_le":"f_ge", "f_ge":"f_le"}[name2]
@@ -262,9 +262,9 @@ def helper(eq, var="v_0"):
262
262
  out = inverse(item, vlist(item)[0])
263
263
  critical.append(out)
264
264
  if equ:
265
- equal.append(str_form(out))
266
- equal = list(set([simplify(tree_form(item)) for item in equal]))
267
- more = list(set([simplify(tree_form(item)) for item in more]))
265
+ equal.append(out)
266
+ equal = list(set([simplify(item) for item in equal]))
267
+ more = list(set([simplify(item) for item in more]))
268
268
  critical = [simplify(item) for item in critical]
269
269
  critical = Counter(critical)
270
270
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: mathai
3
- Version: 0.2.4
3
+ Version: 0.2.5
4
4
  Summary: Mathematics solving Ai tailored to NCERT
5
5
  Home-page: https://github.com/infinity390/mathai4
6
6
  Author: educated indians are having a low iq and are good for nothing
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="mathai",
5
- version="0.2.4",
5
+ version="0.2.5",
6
6
  description="Mathematics solving Ai tailored to NCERT",
7
7
  long_description=open("README.md").read(),
8
8
  long_description_content_type="text/markdown",
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