File size: 12,471 Bytes
0eebf34
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
---
license: apache-2.0
license_link: LICENSE
library_name: math-foundations-ai999x
language:
- en
inference: false
pipeline_tag: question-answering
tags:
- math-foundations
- algebra
- trigonometry
- precalculus
- complex-numbers
- algebra-solver
- math-solver
- fractions
- quadratic-equation
- systems-of-equations
- inequalities
- polynomials
- logarithms
- law-of-sines
- unit-circle
- conic-sections
- vectors
- arithmetic
- percentages
- ratios
- algebraic-equations-and-inequalities
- question-answering
- rust
- math-foundations-solver
- step-by-step-solutions
- homework-help
- offline
- zero-hallucination
- python
- ai999x
model-index:
- name: math-foundations-ai999x
  results:
  - task:
      type: question-answering
      name: math foundations question answering
    dataset:
      name: "Golden answers (681 documented questions, Windows + Linux Python 3.10-3.14)"
      type: ai999x-evaluation
    metrics:
    - type: accuracy
      value: 1.0
      name: "identical on every platform"
---
# Math Foundations (math-foundations-ai999x)

Math Foundations covers arithmetic, fractions, percentages, ratios, algebraic equations and inequalities, functions, exponentials and logarithms, trigonometry, precalculus and complex numbers: 106 calculations in 34 topics, each with its formula, its steps and its units, and a plain reason instead of a number when an input is missing or out of range. One compiled engine, four ways to use it: the desktop app, the command line, the browser and Python. Everything runs on your own computer, offline.

[![The Math Foundations desktop app: Roots of a quadratic equation, with its worked example and live scene](https://www.ai999x.com/?ax_shot=math-foundations-ai999x/hero.webp)](https://www.ai999x.com/models/math-foundations-ai999x/)

## Four ways to use it

| | |
|---|---|
| **Desktop app** (Windows, Linux) | [Windows](https://github.com/AI999X/ai999x-desktop/releases/download/v1.6.7/ai999x-math-foundations-1.6.7-windows-x86_64.zip) 路 [Linux](https://github.com/AI999X/ai999x-desktop/releases/download/v1.6.7/ai999x-math-foundations-1.6.7-linux-x86_64.tar.gz) |
| **Command line** `math-foundations` (Windows, Linux) | [Windows](https://github.com/AI999X/ai999x-desktop/releases/download/v1.6.7/ai999x-cli-1.6.7-windows-x86_64.zip) 路 [Linux](https://github.com/AI999X/ai999x-desktop/releases/download/v1.6.7/ai999x-cli-1.6.7-linux-x86_64.tar.gz) |
| **Browser** (any device) | [Try it on the model page](https://www.ai999x.com/models/math-foundations-ai999x/#capabilities) |
| **Python** 3.10+ | `pip install math-foundations-ai999x`: on Windows and Linux (x86-64) `pip` installs the same compiled engine; on other systems (macOS, ARM) it installs a pure-Python build that gives the same answers |

## See it

From the Math Foundations desktop app: every scene and chart is drawn from the computed answer.

[![Math Foundations desktop app: a slider moves an input and the answer, the scene and the charts follow](https://www.ai999x.com/?ax_shot=math-foundations-ai999x/clip-loop.webp)](https://www.ai999x.com/?ax_shot=math-foundations-ai999x/clip.mp4)

*[Watch the full clip (MP4)](https://www.ai999x.com/?ax_shot=math-foundations-ai999x/clip.mp4)*

| | |
|---|---|
| [![Roots of a quadratic equation: the live scene in the Math Foundations desktop app](https://www.ai999x.com/?ax_shot=math-foundations-ai999x/scene-1.webp)](https://www.ai999x.com/models/math-foundations-ai999x/#cap-quadratic_roots)<br>Roots of a quadratic equation | [![Law of sines, the ambiguous case (two sides and a non-included angle): the live scene in the Math Foundations desktop app](https://www.ai999x.com/?ax_shot=math-foundations-ai999x/scene-2.webp)](https://www.ai999x.com/models/math-foundations-ai999x/#cap-law_of_sines_ssa)<br>Law of sines, the ambiguous case (two sides and a non-included angle) |
| [![Arithmetic with complex numbers: the live scene in the Math Foundations desktop app](https://www.ai999x.com/?ax_shot=math-foundations-ai999x/scene-3.webp)](https://www.ai999x.com/models/math-foundations-ai999x/#cap-complex_arithmetic)<br>Arithmetic with complex numbers | [![Coefficient of a term in a binomial expansion: the live scene in the Math Foundations desktop app](https://www.ai999x.com/?ax_shot=math-foundations-ai999x/scene-4.webp)](https://www.ai999x.com/models/math-foundations-ai999x/#cap-binomial_coefficient_term)<br>Coefficient of a term in a binomial expansion |
| [![Absolute value inequality |ax + b| compared with c: the live scene in the Math Foundations desktop app](https://www.ai999x.com/?ax_shot=math-foundations-ai999x/scene-5.webp)](https://www.ai999x.com/models/math-foundations-ai999x/#cap-abs_linear_inequality)<br>Absolute value inequality |ax + b| compared with c | [![Arithmetic with fractions: the live scene in the Math Foundations desktop app](https://www.ai999x.com/?ax_shot=math-foundations-ai999x/scene-6.webp)](https://www.ai999x.com/models/math-foundations-ai999x/#cap-fraction_arithmetic)<br>Arithmetic with fractions |
| [![Centre and radius of a circle from its general equation: the live scene in the Math Foundations desktop app](https://www.ai999x.com/?ax_shot=math-foundations-ai999x/scene-7.webp)](https://www.ai999x.com/models/math-foundations-ai999x/#cap-circle_from_general_form)<br>Centre and radius of a circle from its general equation | [![Distance between two points: the live scene in the Math Foundations desktop app](https://www.ai999x.com/?ax_shot=math-foundations-ai999x/scene-8.webp)](https://www.ai999x.com/models/math-foundations-ai999x/#cap-distance_between_points)<br>Distance between two points |

Charts:

|   |   |   |   |
|---|---|---|---|
| [![Roots of a quadratic equation: a chart in the Math Foundations desktop app](https://www.ai999x.com/?ax_shot=math-foundations-ai999x/chart-1.webp)](https://www.ai999x.com/models/math-foundations-ai999x/#cap-quadratic_roots)<br>Roots of a quadratic equation | [![Law of sines, the ambiguous case (two sides and a non-included angle): a chart in the Math Foundations desktop app](https://www.ai999x.com/?ax_shot=math-foundations-ai999x/chart-2.webp)](https://www.ai999x.com/models/math-foundations-ai999x/#cap-law_of_sines_ssa)<br>Law of sines, the ambiguous case (two sides and a non-included angle) | [![Arithmetic with complex numbers: a chart in the Math Foundations desktop app](https://www.ai999x.com/?ax_shot=math-foundations-ai999x/chart-3.webp)](https://www.ai999x.com/models/math-foundations-ai999x/#cap-complex_arithmetic)<br>Arithmetic with complex numbers | [![Absolute value inequality |ax + b| compared with c: a chart in the Math Foundations desktop app](https://www.ai999x.com/?ax_shot=math-foundations-ai999x/chart-4.webp)](https://www.ai999x.com/models/math-foundations-ai999x/#cap-abs_linear_inequality)<br>Absolute value inequality |ax + b| compared with c |

## Ask in words: 15 examples

Each question below was asked on this release; the comment under it is the line it printed.

```python
import math_foundations_ai999x as math_foundations

a = math_foundations.ask("Compute (3 + 2i) / (1 - i).")
print(a.outcome, a.values)
# SOLVED {'re': 0.5, 'im': 2.5}

a = math_foundations.ask(
    "Find the centre and radius of x^2 + y^2 - 4x + 6y - 3 = 0."
)
print(a.outcome, a.values)
# SOLVED {'h': 2.0, 'k': -3.0, 'rad': 4.0}

a = math_foundations.ask("Find the distance between (1, 1) and (4, 5).")
print(a.outcome, a.values)
# SOLVED {'dist': 5.0}

a = math_foundations.ask(
    "How many ways are there to choose 3 books from 10?"
)
print(a.outcome, a.values)
# SOLVED {'combinations': 120.0, 'permutations': 720.0}

a = math_foundations.ask(
    "Find the amount after 2 years if 1000 is invested at rate 0.05 "
    "compounded 1 times a year."
)
print(a.outcome, a.values)
# SOLVED {'amount': 1102.5}

a = math_foundations.ask(
    "What is the doubling time for a growth constant of 0.1?"
)
print(a.outcome, a.values)
# SOLVED {'td': 6.931471805599452}

a = math_foundations.ask(
    "An 80 g sample has a half-life of 5 years. How much remains after "
    "15 years?"
)
print(a.outcome, a.values)
# SOLVED {'remaining': 10.0, 'fraction': 0.125}

a = math_foundations.ask("Solve 2^x = 32.")
print(a.outcome, a.values)
# SOLVED {'x': 5.0}

a = math_foundations.ask("Factor x^2 + 5x + 6.")
print(a.outcome, a.values)
# SOLVED {'p': 3.0, 'q': 2.0}

a = math_foundations.ask(
    "If f(0) = 1 and f(5) = 11, what is the average rate of change of "
    "f?"
)
print(a.outcome, a.values)
# SOLVED {'arc': 2.0}

a = math_foundations.ask("Solve the inequality 2x + 1 < 7.")
print(a.outcome, a.values)
# SOLVED {'x0': 3.0, 's': 1.0}

a = math_foundations.ask("Solve |x - 4| < 1.")
print(a.outcome, a.values)
# SOLVED {'lower': 3.0, 'upper': 5.0}

a = math_foundations.ask("Solve 3x + 6 = 0.")
print(a.outcome, a.values)
# SOLVED {'x': -2.0}

a = math_foundations.ask(
    "Find the average rate of change between the points (-2, 5) and "
    "(3, 0)."
)
print(a.outcome, a.values)
# SOLVED {'m': -1.0}

a = math_foundations.ask("Solve log base 3 of x = 4.")
print(a.outcome, a.values)
# SOLVED {'x': 81.0}
```

## Command line: 15 examples

Each command below was run with `math-foundations` of this release; the lines under it are the answer it printed (the full answer goes on with the method, every input in SI units and the conditions it assumes).

```text
$ math-foundations solve abs_linear_inequality a=2 b=3 c=7 "rel=<"
lower = -5
upper = 2
region = between
solution = -5 < x < 2

$ math-foundations solve fraction_arithmetic a=3 b=4 c=5 d=6 op=+
numerator = 19
denominator = 12
value = 1.583333333

$ math-foundations solve complex_arithmetic a=3 b=2 c=1 d=-1 op=/
re = 0.5
im = 2.5

$ math-foundations solve circle_from_general_form dd=-4 ee=6 ff=-3
h = 2
k = -3
rad = 4

$ math-foundations solve distance_between_points x1=1 y1=1 x2=4 y2=5
dist = 5

$ math-foundations solve counting_choices k=3 n=10
combinations = 120
permutations = 720

$ math-foundations solve compound_interest t=2 principal=1000 r=0.05 n=1
amount = 1102.5

$ math-foundations solve doubling_time k=0.1
td = 6.931471806

$ math-foundations solve half_life_remaining n0=80 half_life=5 t=15
remaining = 10
fraction = 0.125

$ math-foundations solve exponential_equation b=2 y=32
x = 5

$ math-foundations solve factor_monic_quadratic b=5 c=6
p = 3
q = 2

$ math-foundations solve average_rate_of_change_definition x_start=0 f_x_start=1 x_end=5 f_x_end=11
arc = 2

$ math-foundations solve linear_inequality a=2 b=1 c=7
x0 = 3
s = 1

$ math-foundations solve abs_value_inequality_upper_bound c=4 d=1
lower = 3
upper = 5

$ math-foundations solve linear_equation_root a=3 b=6 c=0
x = -2
```

## Guides

- Desktop app guide: the window, every calculation, scenes and charts: [PDF](https://huggingface.co/AI999X/math-foundations-ai999x/blob/main/docs/math_foundations_ai999x_desktop_guide.pdf) 路 [HTML](https://huggingface.co/AI999X/math-foundations-ai999x/blob/main/docs/math_foundations_ai999x_desktop_guide.html) 路 [Markdown](https://huggingface.co/AI999X/math-foundations-ai999x/blob/main/docs/math_foundations_ai999x_desktop_guide.md)
- Python guide: every calculation with a Python example: [PDF](https://huggingface.co/AI999X/math-foundations-ai999x/blob/main/docs/math_foundations_ai999x_capabilities.pdf) 路 [HTML](https://huggingface.co/AI999X/math-foundations-ai999x/blob/main/docs/math_foundations_ai999x_capabilities.html) 路 [Markdown](https://huggingface.co/AI999X/math-foundations-ai999x/blob/main/docs/math_foundations_ai999x_capabilities.md)
- Command-line guide: every calculation with the command and what it printed: [PDF](https://huggingface.co/AI999X/math-foundations-ai999x/blob/main/docs/math_foundations_ai999x_rust_guide.pdf) 路 [HTML](https://huggingface.co/AI999X/math-foundations-ai999x/blob/main/docs/math_foundations_ai999x_rust_guide.html) 路 [Markdown](https://huggingface.co/AI999X/math-foundations-ai999x/blob/main/docs/math_foundations_ai999x_rust_guide.md)

Every calculation, with its formula, a worked example and its figures: **[Math Foundations on ai999x.com](https://www.ai999x.com/models/math-foundations-ai999x/)**. Install guides for the app and the command line: [https://www.ai999x.com/desktop-cli/](https://www.ai999x.com/desktop-cli/).

Version 1.6.7 路 License: Apache-2.0 路 Author: Ibnul Jaif Farabi 路 Organization: AI999X 路 Contact: support@ai999x.com 路 [Support the project](https://buymeacoffee.com/ibnuljaiffarabi)

*The Future Is Self-Improving.*