Symbolica 2.0 Ships User-Defined Symbols, JIT Compilation, and Double-Float Math
Symbolica, a symbolic computation framework for Python and Rust, has reached version 2.0 with a focus on letting users define mathematical objects that behave like first-class built-ins. Custom symbols can now register hooks for differentiation, series expansion, printing, and numeric evaluation, so things like a user-defined gamma function can be regularized near its poles or a custom cosh can plug into the frameworkâs evaluator across float, complex, and C++ code-generation backends.
The evaluator stack received the heaviest engineering work. Symbolica now supports JIT compilation through the symjit crate, which becomes the default Python backend and reportedly matches the custom ASM path while keeping compile times bounded. A new double-float arithmetic mode stores numbers as the unevaluated sum of two f64s, yielding roughly 31 decimal digits of precision at over 3x the speed of arbitrary-precision floats. The release also adds built-in gamma, polylogarithm, Bessel, and Riemann zeta functions.
On the API side, the Rust interface trades verbose imports and type paths for a prelude, operator overloading, builder patterns, and a call method on symbols, while fallible operations now return dedicated error types. Notebook output gains automatic line wrapping with colored brackets, HTML and LaTeX rendering, and Typst export for documents.
Read the full article
Continue reading at Hacker News →This is an AI-generated summary. Read the original for the full story.