mathai 2.2.1__tar.gz → 2.2.2__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-2.2.1 → mathai-2.2.2}/PKG-INFO +14 -1
- {mathai-2.2.1 → mathai-2.2.2}/README.md +13 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/__init__.py +2 -0
- mathai-2.2.2/mathai/graphics.py +42 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai.egg-info/PKG-INFO +14 -1
- {mathai-2.2.1 → mathai-2.2.2}/mathai.egg-info/SOURCES.txt +1 -0
- {mathai-2.2.1 → mathai-2.2.2}/setup.py +1 -1
- {mathai-2.2.1 → mathai-2.2.2}/mathai/apart.py +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/base.py +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/decision.py +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/diff.py +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/electronic.py +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/expand.py +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/factor.py +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/formula/differentiation.marshal +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/formula/integration.marshal +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/formula/integration_trig.marshal +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/formula/is_integrate_subs.marshal +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/formula/lambda_compress.marshal +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/formula/lambda_expand.marshal +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/formula/lambda_reduce.marshal +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/formula/limit_infinity.marshal +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/formula/matrix_vectorization_calculus.marshal +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/formula/power_rule.marshal +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/formula/quadratic.marshal +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/formula/statistics_1.marshal +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/formula/statistics_2.marshal +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/formula/test.marshal +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/formula/trigonometry_misc.marshal +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/formula_compiler.py +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/formula_data.py +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/formula_interpretor.py +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/fraction.py +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/integrate.py +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/inverse.py +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/lambda_calculus.py +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/limit.py +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/linear.py +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/logic.py +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/matrix.py +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/ml.py +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/mlscalar.py +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/ode.py +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/parser.py +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/pde.py +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/printeq.py +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/qm.py +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/simplify.py +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/statistics.py +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/test.py +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/tool.py +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/trig.py +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai/univariate_inequality.py +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai.egg-info/dependency_links.txt +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai.egg-info/requires.txt +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/mathai.egg-info/top_level.txt +0 -0
- {mathai-2.2.1 → mathai-2.2.2}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mathai
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.2
|
|
4
4
|
Summary: Mathematics solving Ai tailored to NCERT
|
|
5
5
|
Home-page: https://github.com/infinity390/mathai
|
|
6
6
|
Requires-Python: >=3.7
|
|
@@ -450,6 +450,19 @@ done
|
|
|
450
450
|
8.66474543707973
|
|
451
451
|
```
|
|
452
452
|
|
|
453
|
+
#### Example Demonstration 11 (engineering graphics)
|
|
454
|
+
```python
|
|
455
|
+
from mathai import *
|
|
456
|
+
s = "0 -25 0 None None None None None None 0 None 55 75"
|
|
457
|
+
s = [None if item == "None" else parse(item) for item in s.split(" ")]
|
|
458
|
+
print(solve_graphics(*s))
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
#### Output
|
|
462
|
+
```
|
|
463
|
+
{'v_0': 0, 'v_1': -25, 'v_2': 0, 'v_9': 0, 'v_11': 55, 'v_12': 75, 'v_7': sqrt(2600), 'v_10': arcsin((sqrt(2600)/75)), 'v_8': 75*sqrt((1-((sqrt(2600)/75)^2))), 'v_6': 0, 'v_3': 0, 'v_4': -25+sqrt(2600), 'v_5': 75*sqrt((1-((sqrt(2600)/75)^2)))}
|
|
464
|
+
```
|
|
465
|
+
|
|
453
466
|
### Questions solved using god() function
|
|
454
467
|
|
|
455
468
|
#### Code
|
|
@@ -434,6 +434,19 @@ done
|
|
|
434
434
|
8.66474543707973
|
|
435
435
|
```
|
|
436
436
|
|
|
437
|
+
#### Example Demonstration 11 (engineering graphics)
|
|
438
|
+
```python
|
|
439
|
+
from mathai import *
|
|
440
|
+
s = "0 -25 0 None None None None None None 0 None 55 75"
|
|
441
|
+
s = [None if item == "None" else parse(item) for item in s.split(" ")]
|
|
442
|
+
print(solve_graphics(*s))
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
#### Output
|
|
446
|
+
```
|
|
447
|
+
{'v_0': 0, 'v_1': -25, 'v_2': 0, 'v_9': 0, 'v_11': 55, 'v_12': 75, 'v_7': sqrt(2600), 'v_10': arcsin((sqrt(2600)/75)), 'v_8': 75*sqrt((1-((sqrt(2600)/75)^2))), 'v_6': 0, 'v_3': 0, 'v_4': -25+sqrt(2600), 'v_5': 75*sqrt((1-((sqrt(2600)/75)^2)))}
|
|
448
|
+
```
|
|
449
|
+
|
|
437
450
|
### Questions solved using god() function
|
|
438
451
|
|
|
439
452
|
#### Code
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
from .base import *
|
|
2
|
+
from .fraction import fraction
|
|
3
|
+
from .simplify import simplify
|
|
4
|
+
from .trig import trig0
|
|
5
|
+
import itertools
|
|
6
|
+
from .inverse import inverse
|
|
7
|
+
def solve_graphics(Ax, Ay, Az, Bx, By, Bz, BAx, BAy, BAz, phi, theta, fvl, length):
|
|
8
|
+
eq1 = TreeNode("f_eq", [TreeNode("v_6"), TreeNode("v_3")-TreeNode("v_0")])
|
|
9
|
+
eq2 = TreeNode("f_eq", [TreeNode("v_7"), TreeNode("v_4")-TreeNode("v_1")])
|
|
10
|
+
eq3 = TreeNode("f_eq", [TreeNode("v_8"), TreeNode("v_5")-TreeNode("v_2")])
|
|
11
|
+
eq4 = TreeNode("f_eq", [TreeNode("v_6"), TreeNode("v_9").fx("sin")*TreeNode("v_12")])
|
|
12
|
+
eq5 = TreeNode("f_eq", [TreeNode("v_7"), TreeNode("v_10").fx("sin")*TreeNode("v_12")])
|
|
13
|
+
eq6 = TreeNode("f_eq", [TreeNode("v_8"), (TreeNode("d_1") - TreeNode("v_9").fx("sin")**2 - TreeNode("v_10").fx("sin")**2).fx("sqrt")*TreeNode("v_12")])
|
|
14
|
+
eq7 = TreeNode("f_eq", [TreeNode("v_7"), (TreeNode("v_12")**2 - TreeNode("v_11")**2).fx("sqrt")])
|
|
15
|
+
q = operation("f_and", [eq1, eq2, eq3, eq4, eq5, eq6, eq7])
|
|
16
|
+
lst = [Ax, Ay, Az, Bx, By, Bz, BAx, BAy, BAz, phi, theta, fvl, length]
|
|
17
|
+
lst_map = {}
|
|
18
|
+
for index, item in enumerate(lst):
|
|
19
|
+
lst_map[index] = item
|
|
20
|
+
solution = {}
|
|
21
|
+
for i in range(len(lst_map.keys())):
|
|
22
|
+
if lst_map[i] is not None:
|
|
23
|
+
solution[f"v_{i}"] = lst_map[i]
|
|
24
|
+
done = True
|
|
25
|
+
q = simplify(q)
|
|
26
|
+
while done:
|
|
27
|
+
done = False
|
|
28
|
+
for i in range(len(q.children)):
|
|
29
|
+
item = q.children[i]
|
|
30
|
+
for key, item2 in solution.items():
|
|
31
|
+
item = replace(item, TreeNode(key), item2)
|
|
32
|
+
item = fraction(trig0(simplify(item)))
|
|
33
|
+
q.children[i] = item
|
|
34
|
+
if len(vlist(item)) == 1:
|
|
35
|
+
solution[vlist(item)[0]] = inverse(
|
|
36
|
+
item.children[0], vlist(item)[0]
|
|
37
|
+
)
|
|
38
|
+
done = True
|
|
39
|
+
break
|
|
40
|
+
if done:
|
|
41
|
+
continue
|
|
42
|
+
return solution
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mathai
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.2
|
|
4
4
|
Summary: Mathematics solving Ai tailored to NCERT
|
|
5
5
|
Home-page: https://github.com/infinity390/mathai
|
|
6
6
|
Requires-Python: >=3.7
|
|
@@ -450,6 +450,19 @@ done
|
|
|
450
450
|
8.66474543707973
|
|
451
451
|
```
|
|
452
452
|
|
|
453
|
+
#### Example Demonstration 11 (engineering graphics)
|
|
454
|
+
```python
|
|
455
|
+
from mathai import *
|
|
456
|
+
s = "0 -25 0 None None None None None None 0 None 55 75"
|
|
457
|
+
s = [None if item == "None" else parse(item) for item in s.split(" ")]
|
|
458
|
+
print(solve_graphics(*s))
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
#### Output
|
|
462
|
+
```
|
|
463
|
+
{'v_0': 0, 'v_1': -25, 'v_2': 0, 'v_9': 0, 'v_11': 55, 'v_12': 75, 'v_7': sqrt(2600), 'v_10': arcsin((sqrt(2600)/75)), 'v_8': 75*sqrt((1-((sqrt(2600)/75)^2))), 'v_6': 0, 'v_3': 0, 'v_4': -25+sqrt(2600), 'v_5': 75*sqrt((1-((sqrt(2600)/75)^2)))}
|
|
464
|
+
```
|
|
465
|
+
|
|
453
466
|
### Questions solved using god() function
|
|
454
467
|
|
|
455
468
|
#### Code
|
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
from pathlib import Path
|
|
3
3
|
setup(
|
|
4
4
|
name="mathai",
|
|
5
|
-
version="2.2.
|
|
5
|
+
version="2.2.2",
|
|
6
6
|
description="Mathematics solving Ai tailored to NCERT",
|
|
7
7
|
long_description=Path("README.md").read_text(encoding="utf-8"),
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|