diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-25 21:27:16 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-25 21:27:16 +0200 |
| commit | 9bee0ec4c3dd232d8e3957eb3d4b27cca4a8414c (patch) | |
| tree | e85643820fdc9a4f60952f4e16d80b0155513c34 | |
| parent | a3d3b676796f93f41f5b44b1d2b86b15f99080a0 (diff) | |
docs: Move Rational Number Mode section to after Testing
The 'Rational Number Mode (Optional)' section was positioned right after
the title and before 'Installation', which was confusing for users.
This change moves the section to appear after 'Testing' and before
'License', following a more logical documentation flow:
1. What the tool is (title)
2. How to install it
3. How to use it (core features)
4. Optional advanced features (Rational mode)
5. Building and testing
6. License
| -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. |
