rpn.1: made more better

This commit is contained in:
Emma Tebibyte 2024-02-03 17:20:31 -07:00
parent 6d7522be01
commit 8e0eaeab38
Signed by untrusted user: emma
GPG Key ID: 06FA419A1698C270

View File

@ -20,6 +20,10 @@ rpn
Rpn parses and and evaluates reverse polish notation expressions either from the
standard input or by parsing its arguments. See the STANDARD INPUT section.
Upon evaluation, rpn will print the resulting number on the stack to the
standard output. Any further specified numbers will be placed on the stack
following the last outputted number.
For information on for reverse polish notation syntax, see rpn(7).
.SH STANDARD INPUT
@ -28,6 +32,11 @@ If rpn is passed arguments, it interprets them as an expression to be evaluated.
Otherwise, it reads whitespace-delimited numbers and operations from the
standard input.
.SH DIAGNOSTICS
If encountering a syntax error, rpn will exit with the appropriate error code
as defined by sysexits.h(3) and print an error message.
.SH CAVEATS
Due to precision constraints and the way floats are represented in accordance
@ -36,11 +45,6 @@ arithmetic has rounding errors. This is somewhat curbed by using the
second-highest float that can be represented in line with this standard to round
numbers to before outputting.
.SH DIAGNOSTICS
If encountering a syntax error, rpn will exit with the appropriate error code
as defined by sysexits.h(3) and print an error message.
.SH RATIONALE
An infix notation calculation utility, bc(1p), is included in the POSIX