A text calculator with support for units and conversion, using 128-bit decimal floating points for high accuracy.
cpc is a text-based calculator that parses and evaluates mathematical expressions with support for units and conversions. It solves the problem of performing accurate calculations involving physical units by using 128-bit decimal floating-point arithmetic to minimize precision errors. Developers can use it via CLI, web interface, or as a Rust library.
Developers, engineers, and students who need to perform accurate calculations with physical units, either interactively via CLI or programmatically in Rust applications.
cpc offers high accuracy through 128-bit decimal floating points, supports a wide range of physical units with automatic conversion, and provides both CLI and library interfaces for flexibility. Its unit-aware parsing allows mixing units in expressions without manual conversion.
Text calculator with support for units and conversion
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses 128-bit decimal floating-point numbers (d128) to minimize precision loss, as emphasized in the accuracy section of the README, making it suitable for calculations where binary floating-point errors are problematic.
Includes a wide range of unit types such as time, length, mass, and more, with automatic conversion capabilities, listed in the supported unit types, allowing for versatile calculations without manual unit handling.
Offers CLI, web interface, and Rust library options, as shown in installation and usage examples, providing multiple ways to integrate or use the tool based on user preference.
Can evaluate expressions with mixed units like '1 km - 1m' and automatically handle conversions, making calculations intuitive and reducing manual conversion errors.
Does not support dynamically updated units like currency, which is acknowledged in the potential improvements section of the README, limiting its use for real-time data applications.
While high-precision, results are not always 100% accurate and may require rounding to 20 decimals or less, as admitted in the accuracy notes, which could be a concern for critical calculations.
Primarily a Rust library, so integration into non-Rust projects requires additional work or is not directly supported, making it less accessible for developers in other ecosystems.