# markrogoyski/math-php

Powerful modern math library for PHP: Features descriptive statistics and regressions; Continuous and discrete probability distributions; Linear algebra with matrices and vectors, Numerical analysis; special mathematical functions; Algebra

Repository: https://github.com/markrogoyski/math-php
Canonical: https://ross.abutalabs.com/products/math-php
Language: PHP
License: MIT
License Family: permissive
Topics: math, mathematics, linear-algebra, statistics, matrix, probability, distributions, regression, numerical-analysis, information-theory, number-theory, vector, finance, combinatorics, algebra, php, php-library
Last push: 2026-03-09T00:06:41+00:00

## Health v2 (maintenance only)
Score: 62/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 71, release rhythm 29, longevity 100
- inputs: {"age_days": 3804, "days_push": 178, "days_rel": 313, "gap_med": 135.0, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2410, forks 240 (observed 2026-08-28T04:06:44.339398+00:00)

## What it is
MathPHP is a pure PHP math library with no external dependencies covering statistics, probability distributions, linear algebra, numerical analysis, algebra, finance, and number theory. It provides a comprehensive, self-contained toolkit for integrating mathematical computation into PHP applications.

## Use cases
- compute descriptive statistics and regressions in php
- work with matrices and vectors in php
- calculate probability distributions
- perform numerical integration and root finding
- do statistical analysis like ANOVA and PCA in php
- financial calculations in php

## When to choose
- you need math or statistics functionality in a PHP project
- you want a dependency-free pure PHP library
- you need linear algebra, probability, or numerical analysis in PHP

## When to avoid
- you need high-performance scientific computing (use NumPy/SciPy)
- your project is not in PHP
- you need symbolic math or a computer algebra system

## Facets
- artifact type: library
- maturity: active
- function: math
- domain: mathematics, data-science
- platform: php
- tags: statistics, linear-algebra, probability-distributions, numerical-analysis, pure-php, no-dependencies, algorithms

## Member repositories
- markrogoyski/math-php (main) score 62

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:44.339398+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:33:59.871944+00:00, confidence not recorded.
  - readme: https://github.com/markrogoyski/math-php (fetched 2026-08-28T04:06:44.339398+00:00, sha a9eb625c9575)
- Data as of 2026-08-30T08:39:29.467469+00:00.
