Yacas
A small, flexible, general-purpose computer algebra system whose rule-based functional language lets users build symbolic mathematics from the ground up.
Created by Ayal Z. Pinkus, with Serge Winitzki, Grzegorz Mazur, and contributors
Yacas — short for Yet Another Computer Algebra System — is a small, general-purpose computer algebra system (CAS) for the symbolic manipulation of mathematical expressions. It can differentiate and integrate, solve equations, expand series, and perform arbitrary-precision numerical computation, all driven by its own functional, rule-based programming language. What sets Yacas apart from heavyweight systems like Mathematica or Maxima is its architecture: a deliberately small C++ core engine interprets an extensive script library written in the Yacas language itself, so almost all of the mathematics is user-readable, user-modifiable code. Released under the GNU Lesser General Public License, Yacas has served for over two decades as both a practical lightweight CAS and a “do-it-yourself” laboratory for learning how symbolic algebra systems are built.
History & Origins
Development of Yacas began in early 1999, when Dutch programmer Ayal Z. Pinkus set out to build a compact, flexible algebra system, with the first public release appearing that same year. Physicist Serge Winitzki joined as a major contributor, expanding the mathematical library and co-authoring the system’s extensive documentation.
In 2002, Pinkus and Winitzki presented Yacas to the research community in the paper “Yacas: A Do-It-Yourself Symbolic Algebra Environment” at the joint AISC/Calculemus conference, published in Springer’s Lecture Notes in Computer Science. The title captured the project’s identity: rather than competing with commercial giants on raw capability, Yacas offered a transparent environment where the algorithms themselves — simplification, integration, polynomial arithmetic — were written in the Yacas scripting language and open to inspection and extension.
In the 2010s, stewardship of the project passed to Grzegorz Mazur, who modernized the codebase, moved development to GitHub, and shipped a series of releases culminating in version 1.9.1 on July 4, 2020, the current stable version.
Design Philosophy
Yacas is built around a few distinctive convictions:
- A small core, a big library. The C++ engine provides parsing, memory management, arbitrary-precision arithmetic, and a set of hard-wired primitives. Everything else — calculus, equation solving, simplification — lives in scripts written in Yacas itself. Users can read, override, and extend the same code the system runs on.
- Computation is term rewriting. The primary programming construct is the transformation rule: a pattern to match and a replacement to substitute. Evaluation proceeds by repeatedly rewriting expressions until no more rules apply — in Yacas, evaluation is simplification, and an expression that cannot be simplified further is simply returned as-is.
- Lisp bones, mathematical skin. Internally, expressions are Lisp-style prefix trees (
a+bbecomes(+ a b)), and the project’s documentation notes that much of the inner workings follow how Lisp-like languages are built. On the surface, however, users write familiar infix mathematical notation with C-like flavor. - Interoperability over lock-in. Yacas reads and writes plain ASCII and supports the OpenMath standard for exchanging mathematical expressions, and it can run interactively or in batch mode as a component of larger systems.
The Yacas Language
The Yacas language is dynamically typed and functional, with pattern matching at its heart. Rules are declared with a precedence, a pattern (which may carry predicates), and a replacement body:
| |
Rules with precedence 10 are tried before those with precedence 20, and the n_IsInteger pattern only matches when the predicate holds. Interactive sessions read naturally as mathematics:
| |
Constructs like D(x) and Limit(x, 0) use Yacas’s distinctive “bodied” function syntax, where the final argument follows the parenthesized ones — mirroring how mathematicians write operators.
Key Features
| Area | Capabilities |
|---|---|
| Calculus | Symbolic differentiation, integration, limits, Taylor series |
| Algebra | Polynomial arithmetic, equation solving, expression simplification |
| Numerics | Arbitrary-precision integer, rational, and floating-point arithmetic |
| Language | Rule-based rewriting, pattern matching with predicates, functional programming |
| Interfaces | Text console, Qt-based GUI, native Jupyter kernel, Emscripten browser build |
| Interchange | Plain ASCII and OpenMath input/output, interactive or batch operation |
According to the project’s official documentation, Yacas runs on Windows, macOS, and Linux, and an alternative Java implementation of the engine is also maintained in the source tree.
Evolution
Yacas’s trajectory has been one of steady refinement rather than reinvention. The early Pinkus–Winitzki era established the core engine, the script library, and unusually thorough documentation — including a book-style reference on the algorithms behind the system. Under Grzegorz Mazur’s maintainership, later releases modernized the build system around CMake, added the Qt-based yacas-gui, introduced the Jupyter kernel, improved Unicode support, and brought the engine to the web via Emscripten. The 1.x line’s releases in 2019 and 2020 (1.8.0 and 1.9.1) reflect a mature project in maintenance mode: stable, portable, and quietly useful.
The language has also propagated beyond its original implementation. MathPiper, a Java-based fork oriented toward mathematics education, carries the Yacas language forward on the JVM, while Ryacas wraps the engine for the R statistical environment — its 2019 rewrite (Ryacas 1.0) gave R users a cleaner bridge to symbolic computation that remains on CRAN today.
Current Relevance
Yacas occupies a niche the big systems cannot: a CAS small enough to embed, port, and fully understand. Where Mathematica and Maple are commercial platforms and Maxima carries half a century of Lisp heritage, Yacas is a compact LGPL-licensed engine that compiles to the browser, slots into Jupyter, and hides nothing from its users. Its most active life today is arguably inside other tools — R sessions using Ryacas, educational environments built on MathPiper, and the in-browser demo that introduces newcomers to symbolic computation with zero setup. Development of the core has slowed since the 2020 release, but the system remains available, documented, and genuinely runnable on modern machines.
Why It Matters
Most computer algebra systems are consumed as black boxes; Yacas was designed to be opened. By putting nearly all of its mathematics in a readable script library and documenting the algorithms behind it, Yacas turned the CAS itself into a teaching instrument — a system you could study, modify, and rebuild rather than merely invoke. Its rule-based language is also a clean, practical demonstration of term rewriting as a programming paradigm: programs as collections of mathematical identities, evaluation as simplification. For anyone curious about what actually happens between typing an integral and seeing its closed form, Yacas remains one of the most approachable answers ever written.
Timeline
Notable Uses & Legacy
Ryacas (R ecosystem)
The Ryacas package on CRAN embeds the Yacas engine in R, letting statisticians do symbolic differentiation, equation solving, arbitrary-precision arithmetic, and LaTeX output from within R workflows.
MathPiper
A Java-based fork of Yacas aimed at mathematics education, carrying the Yacas rule-based language and script library into the JVM world.
Yacas in the browser
The C++ engine is compiled with Emscripten to run entirely in a web browser, powering the online demo on yacas.org where users can try symbolic computation without installing anything.
Jupyter notebooks
Yacas provides a native Jupyter kernel, so symbolic sessions can be run and documented in notebook form alongside other scientific computing tools.
Teaching computer algebra internals
Because nearly all of its mathematics lives in a readable script library atop a small core, Yacas is used to study and prototype how computer algebra systems actually work, with its documentation doubling as a book of the underlying algorithms.