calcula
A simple calculator library and command-line app.
Gets input with rustyline, so emacs-style shortcuts are supported (Ctrl-A to move to the beginning of the line, Ctrl-E to move to the end of the line, Ctrl-U to clear, etc.).
See their linked GitHub page for more information.
Planned Features
- Interactive REPL mode or performing a single calculation as an argument
- Rust-style variable bindings and number types (
i32,u8,f64, etc.) - Functions
- Built-in math library for constants like
piand operations likesin(2.0)sqrt(7.0) - Number literals in various bases (
0xFF,0b1010,0o777etc.) - Meta commands:
:binaryfor printing as binary,:hexfor printing as hex,:typefor printing a variable's type, etc. - Bitfield operations (
(0b1010 << 2) | 0b11) - Error handling: warning on overflow of datatypes
License
Licensed under Apache 2.