A lightweight CAS library with step-by-step human explanations and zero external dependencies.

Maintainers

Package info

github.com/sobhanmohammadi-dev/cas

pkg:composer/sobhanmohammadi/cas

Transparency log

Statistics

Installs: 23

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

v2.2.2 2026-07-22 04:17 UTC

This package is auto-updated.

Last update: 2026-07-22 04:27:47 UTC


README

A lightweight, zero-dependency Computer Algebra System (CAS) library for PHP with step-by-step human-readable explanations.

Latest Version Required PHP Version License Total Downloads

📖 About

CAS is a Computer Algebra System written entirely in PHP. Unlike numerical calculators that work with floating-point approximations, this library manipulates mathematical expressions symbolically — just like a human would when solving algebra problems by hand.

The killer feature? It explains every single step in plain, human-readable text (Persian & English). Whether you're building an educational platform, a math tutor bot, or simply need exact symbolic computation in your PHP application, this library has you covered — with absolutely zero external dependencies.

âœĻ Key Features

Category Details
ðŸ”Ī Symbolic Computation Exact arithmetic on integers, rationals, and complex numbers — no floating-point errors
📊 Algebraic Simplification Fully recursive simplification engine with convergence detection
ðŸ§Đ Equation Solving Symbolic & numeric solvers (currently linear; higher-order planned)
📝 Step-by-Step Explanations Every operation is recorded and explained in Persian & English
ðŸŒģ AST-Based Architecture All expressions are parsed into a tree structure for easy manipulation
ðŸ”Ē Rich Numeric Support Integers (GMP), Rationals, Complex numbers, π
ðŸŠķ Zero Dependencies Pure PHP — only needs GMP extension (bundled with PHP by default)
📐 PSR-4 Compliant Clean, modern namespace structure
⚡ Lightweight Minimal overhead; designed for embedding in larger projects

🚀 Installation

Install via Composer:

composer require sobhanmohammadi/cas