| Crates.io | helix-calc |
| lib.rs | helix-calc |
| version | 1.3.0 |
| created_at | 2025-03-05 12:32:53.070714+00 |
| updated_at | 2025-05-25 02:40:12.791891+00 |
| description | Reverse Polish Notation calculator in a terminal app. |
| homepage | |
| repository | https://github.com/chbug/hc |
| max_upload_size | |
| id | 1578956 |
| size | 93,785 |
Helix Calc is a simple Reverse Polish Notation calculator.
It's written in Rust, using Ratatui for the cross-platform interface and bigdecimal-rs for the internal operations.
The name is inspired by Helix Editor, and the functionality by the venerable GNU dc.
This is a toy app that fulfills my personal needs, but I'm open to PR :)
+, -, *, / : perform the arithmetic operation on the top two values.% : compute the modulo of the second value divided by the first.^ : raise the second value to the power of the first.P : pop the top value off the stack.d : duplicate the top value.v : compute the square root of the top value.k : pop the top value and use it to set the precision.r : swap the first two values.Two options to enter them:
_123.123- (careful, no space).By default, BigDecimal is compiled with a max precision of 100 digits: beyond that size, decimal places will be dropped, even if the integer part can handle much larger numbers.