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

Four ways to use it

Desktop app (Windows, Linux) Windows · Linux
Command line math-foundations (Windows, Linux) Windows · Linux
Browser (any device) Try it on the model page
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

Watch the full clip (MP4)

Roots of a quadratic equation: the live scene in the Math Foundations desktop app
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
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
Arithmetic with complex numbers
Coefficient of a term in a binomial expansion: the live scene in the Math Foundations desktop app
Coefficient of a term in a binomial expansion
[![Absolute value inequality ax + b
Centre and radius of a circle from its general equation: the live scene in the Math Foundations desktop app
Centre and radius of a circle from its general equation
Distance between two points: the live scene in the Math Foundations desktop app
Distance between two points

Charts:

Roots of a quadratic equation: a chart in the Math Foundations desktop app
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
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
Arithmetic with complex numbers
[![Absolute value inequality

Ask in words: 15 examples

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

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).

$ 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

Rust library: 15 examples

The crate math-foundations-ai999x (in rust/ of the GitHub repository) answers a JSON request with math_foundations_ai999x::solve_json. Each call below was compiled and run on this release; the comment under it is what it printed. The whole program is rust/math-foundations/examples/readme.rs: cd rust && cargo run --release --example readme -p math-foundations-ai999x.

use serde_json::{json, Value};

fn show(request: Value) {
    let answer: Value = serde_json::from_str(&math_foundations_ai999x::solve_json(&request.to_string())).unwrap();
    println!("{}", answer["outcome"].as_str().unwrap_or(""));
    for v in answer["values"].as_array().into_iter().flatten() {
        let unit = v[2].as_str().unwrap_or("");
        let unit = if unit.is_empty() || unit == "1" { String::new() } else { format!(" {unit}") };
        println!("{} = {}{}", v[0].as_str().unwrap_or(""), v[1], unit);
    }
}

show(json!({"key": "abs_linear_inequality", "inputs": {"a": "2", "b": "3", "c": "7", "rel": "<"}}));
// SOLVED
// lower = -5.0
// upper = 2.0
// region = "between"
// solution = "-5 < x < 2"

show(json!({"key": "fraction_arithmetic", "inputs": {"a": "3", "b": "4", "c": "5", "d": "6", "op": "+"}}));
// SOLVED
// numerator = 19.0
// denominator = 12.0
// value = 1.5833333333333333

show(json!({"key": "complex_arithmetic", "inputs": {"a": "3", "b": "2", "c": "1", "d": "-1", "op": "/"}}));
// SOLVED
// re = 0.5
// im = 2.5

show(json!({"key": "circle_from_general_form", "inputs": {"dd": "-4", "ee": "6", "ff": "-3"}}));
// SOLVED
// h = 2.0
// k = -3.0
// rad = 4.0

show(json!({"key": "distance_between_points", "inputs": {"x1": "1", "y1": "1", "x2": "4", "y2": "5"}}));
// SOLVED
// dist = 5.0

show(json!({"key": "counting_choices", "inputs": {"k": "3", "n": "10"}}));
// SOLVED
// combinations = 120.0
// permutations = 720.0

show(json!({"key": "compound_interest", "inputs": {"t": "2", "principal": "1000", "r": "0.05", "n": "1"}}));
// SOLVED
// amount = 1102.5

show(json!({"key": "doubling_time", "inputs": {"k": "0.1"}}));
// SOLVED
// td = 6.931471805599453

show(json!({"key": "half_life_remaining", "inputs": {"n0": "80", "half_life": "5", "t": "15"}}));
// SOLVED
// remaining = 10.0
// fraction = 0.125

show(json!({"key": "exponential_equation", "inputs": {"b": "2", "y": "32"}}));
// SOLVED
// x = 5.0

show(json!({"key": "factor_monic_quadratic", "inputs": {"b": "5", "c": "6"}}));
// SOLVED
// p = 3.0
// q = 2.0

show(json!({"key": "average_rate_of_change_definition", "inputs": {"x_start": "0", "f_x_start": "1", "x_end": "5", "f_x_end": "11"}}));
// SOLVED
// arc = 2.0

show(json!({"key": "linear_inequality", "inputs": {"a": "2", "b": "1", "c": "7"}}));
// SOLVED
// x0 = 3.0
// s = 1.0

show(json!({"key": "abs_value_inequality_upper_bound", "inputs": {"c": "4", "d": "1"}}));
// SOLVED
// lower = 3.0
// upper = 5.0

show(json!({"key": "linear_equation_root", "inputs": {"a": "3", "b": "6", "c": "0"}}));
// SOLVED
// x = -2.0

Guides

  • Desktop app guide: the window, every calculation, scenes and charts: PDF · HTML · Markdown
  • Python guide: every calculation with a Python example: PDF · HTML · Markdown
  • Command-line guide: every calculation with the command and what it printed: PDF · HTML · Markdown

Every calculation, with its formula, a worked example and its figures: Math Foundations on ai999x.com. Install guides for the app and the command line: https://www.ai999x.com/desktop-cli/.

Version 1.6.4 · License: Apache-2.0 · Author: Ibnul Jaif Farabi · Organization: AI999X · Contact: support@ai999x.com · Support the project

The Future Is Self-Improving.

Downloads last month
272
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Collections including AI999X/math-foundations-ai999x

Evaluation results

  • identical on every platform on Golden answers (681 documented questions, Windows + Linux Python 3.10-3.14)
    self-reported
    1.000