diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 50 |
1 files changed, 24 insertions, 26 deletions
@@ -6,32 +6,6 @@ A simple AI-engineered command-line percentage calculator written in Go. -## Rational Number Mode (Optional) - -The calculator supports precise rational number calculations using Go's `*big.Rat` type. By default, calculations use float64 for performance. - -### Enabling Rational Mode - -In REPL mode, you can switch between float64 and rational number modes: - -``` -> rat on # Enable rational number mode -Rational mode enabled - -> rat off # Disable rational number mode (default) -Rational mode disabled (using float64) - -> rat toggle # Switch to the other mode -Rational mode enabled -``` - -When rational mode is enabled: -- Results are calculated with arbitrary precision -- Output is displayed as a decimal approximation -- Use `rat off` to return to standard float64 calculations - -## Installation - ## Installation ```bash @@ -279,6 +253,30 @@ Or for RPN-specific tests: mage testRPN ``` +## Rational Number Mode (Optional) + +The calculator supports precise rational number calculations using Go's `*big.Rat` type. By default, calculations use float64 for performance. + +### Enabling Rational Mode + +In REPL mode, you can switch between float64 and rational number modes: + +``` +> rat on # Enable rational number mode +Rational mode enabled + +> rat off # Disable rational number mode (default) +Rational mode disabled (using float64) + +> rat toggle # Switch to the other mode +Rational mode enabled +``` + +When rational mode is enabled: +- Results are calculated with arbitrary precision +- Output is displayed as a decimal approximation +- Use `rat off` to return to standard float64 calculations + ## License See LICENSE file for details. |
