Fossil Math is a lightweight, cross-platform mathematics library written in pure C with zero external dependencies. Designed for high-performance computation, embedded systems, and cross-platform applications, Fossil Math provides a robust set of functions for linear algebra, geometry, trigonometry, numerical analysis, symbolic computation, calculator utilities, and tensor operations—all optimized for efficiency and portability.
-
Cross-Platform Support
Runs reliably on Windows, macOS, Linux, and embedded platforms. -
Comprehensive Math Functions
Includes linear algebra, vectors, matrices, quaternions, trigonometry, symbolic math, calculator routines, and tensor utilities. -
Lightweight and Efficient
Optimized for performance with minimal resource usage, suitable for embedded and low-power devices. -
Precision and Reliability
Provides stable and accurate numerical results for high-precision calculations. -
Modular Design
Easily integrated into projects, with optional modules for advanced math features.
To get started, ensure you have the following installed:
- Meson Build System: If you don’t have Meson
1.8.0or newer installed, follow the installation instructions on the official Meson website. - Conan Package Manager: If you prefer using Conan, ensure it is installed by following the instructions on the official Conan website.
To add a git-wrap, place a .wrap file in subprojects with the Git repo URL and revision, then use dependency('fossil-math') in meson.build so Meson can fetch and build it automatically.
Add the fossil-math.wrap file in your subprojects directory and include the following content:
[wrap-git]
url = https://github.com/fossillogic/fossil-math.git
revision = v0.1.1
[provide]
dependency_names = fossil-mathNote: For the best experience, always use the latest releases. Visit the releases page for the latest versions.
Customize your build with the following Meson options: • Enable Tests To run the built-in test suite, configure Meson with:
meson setup builddir -Dwith_test=enabledThe project is designed so that test cases serve two purposes:
- ✅ Unit Tests – validate the framework’s correctness.
- 📖 Usage Samples – demonstrate how to use these libraries through test cases.
This approach keeps the codebase compact and avoids redundant “hello world” style examples.
Instead, the same code that proves correctness also teaches usage.
This mirrors the Meson build system itself, which tests its own functionality by using Meson to test Meson.
In the same way, Fossil Logic validates itself by demonstrating real-world usage in its own tests via Fossil Test.
meson test -C builddir -vRunning the test suite gives you both verification and practical examples you can learn from.
For those interested in contributing, reporting issues, or seeking support, please open an issue on the project repository or visit the Fossil Logic Docs for more information. Your feedback and contributions are always welcome.