mathai 0.5.8__tar.gz → 0.6.0__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 (32) hide show
  1. {mathai-0.5.8 → mathai-0.6.0}/PKG-INFO +1 -1
  2. {mathai-0.5.8 → mathai-0.6.0}/mathai/factor.py +2 -2
  3. {mathai-0.5.8 → mathai-0.6.0}/mathai/simplify.py +2 -2
  4. {mathai-0.5.8 → mathai-0.6.0}/mathai/univariate_inequality.py +2 -1
  5. {mathai-0.5.8 → mathai-0.6.0}/mathai.egg-info/PKG-INFO +1 -1
  6. {mathai-0.5.8 → mathai-0.6.0}/setup.py +1 -1
  7. {mathai-0.5.8 → mathai-0.6.0}/README.md +0 -0
  8. {mathai-0.5.8 → mathai-0.6.0}/mathai/__init__.py +0 -0
  9. {mathai-0.5.8 → mathai-0.6.0}/mathai/apart.py +0 -0
  10. {mathai-0.5.8 → mathai-0.6.0}/mathai/base.py +0 -0
  11. {mathai-0.5.8 → mathai-0.6.0}/mathai/bivariate_inequality.py +0 -0
  12. {mathai-0.5.8 → mathai-0.6.0}/mathai/console.py +0 -0
  13. {mathai-0.5.8 → mathai-0.6.0}/mathai/diff.py +0 -0
  14. {mathai-0.5.8 → mathai-0.6.0}/mathai/expand.py +0 -0
  15. {mathai-0.5.8 → mathai-0.6.0}/mathai/fraction.py +0 -0
  16. {mathai-0.5.8 → mathai-0.6.0}/mathai/integrate.py +0 -0
  17. {mathai-0.5.8 → mathai-0.6.0}/mathai/inverse.py +0 -0
  18. {mathai-0.5.8 → mathai-0.6.0}/mathai/limit.py +0 -0
  19. {mathai-0.5.8 → mathai-0.6.0}/mathai/linear.py +0 -0
  20. {mathai-0.5.8 → mathai-0.6.0}/mathai/logic.py +0 -0
  21. {mathai-0.5.8 → mathai-0.6.0}/mathai/matrix.py +0 -0
  22. {mathai-0.5.8 → mathai-0.6.0}/mathai/ode.py +0 -0
  23. {mathai-0.5.8 → mathai-0.6.0}/mathai/parser.py +0 -0
  24. {mathai-0.5.8 → mathai-0.6.0}/mathai/printeq.py +0 -0
  25. {mathai-0.5.8 → mathai-0.6.0}/mathai/structure.py +0 -0
  26. {mathai-0.5.8 → mathai-0.6.0}/mathai/tool.py +0 -0
  27. {mathai-0.5.8 → mathai-0.6.0}/mathai/trig.py +0 -0
  28. {mathai-0.5.8 → mathai-0.6.0}/mathai.egg-info/SOURCES.txt +0 -0
  29. {mathai-0.5.8 → mathai-0.6.0}/mathai.egg-info/dependency_links.txt +0 -0
  30. {mathai-0.5.8 → mathai-0.6.0}/mathai.egg-info/requires.txt +0 -0
  31. {mathai-0.5.8 → mathai-0.6.0}/mathai.egg-info/top_level.txt +0 -0
  32. {mathai-0.5.8 → mathai-0.6.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mathai
3
- Version: 0.5.8
3
+ Version: 0.6.0
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
@@ -57,10 +57,10 @@ def _factorconst(eq):
57
57
  if not numbers:
58
58
  return None # empty list
59
59
  n = 1
60
+ if math.prod(numbers) < 0:
61
+ n = -1
60
62
  hcf = numbers[0]
61
63
  for num in numbers[1:]:
62
- if num < 0:
63
- n = -1
64
64
  hcf = math.gcd(hcf, abs(num))
65
65
  return hcf*n
66
66
  def extractnum(eq):
@@ -433,7 +433,7 @@ def other_node(eq):
433
433
  out = frac(b*c)
434
434
  if out is not None:
435
435
  out2 = frac(b)
436
- if out.numerator % 2 == 0 or out2.numerator % 2 != 0:
436
+ if out.numerator % 2 == 0 or (out2 is not None and out2.numerator % 2 != 0):
437
437
  return eq.children[0].children[0] ** (b*c)
438
438
  else:
439
439
  return eq.children[0].children[0].fx("abs") ** (b*c)
@@ -495,7 +495,7 @@ def solve3(eq):
495
495
  a = lambda x: multiply_node(x)
496
496
  b = lambda x: addition_node(x)
497
497
  c = lambda x: other_node(x)
498
- return dowhile(eq, lambda x: c(b(a(x))))
498
+ return dowhile(eq, lambda x: flatten_tree(c(b(a(x)))))
499
499
 
500
500
  def simplify(eq, basic=True):
501
501
  if eq is None:
@@ -198,9 +198,10 @@ def prepare(eq):
198
198
  return None
199
199
  out = poly(eq, vlist(eq)[0])
200
200
  if out is None or len(out) > 3:
201
+
201
202
  output = []
202
203
  for item in factor_generation(eq):
203
- if item.name == "f_pow" and item.children[1].name == "d_1":
204
+ if item.name == "f_pow" and item.children[1].name == "d_-1":
204
205
  out2 = poly(item.children[0], vlist(eq)[0])
205
206
  if out2 is not None and len(out2) <= 3:
206
207
  output.append(poly_simplify(item.children[0])**-1)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mathai
3
- Version: 0.5.8
3
+ Version: 0.6.0
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.5.8",
5
+ version="0.6.0",
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
File without changes