From 8e0eaeab389d7ba0309f0f2b4d158f65167ee9be Mon Sep 17 00:00:00 2001 From: emma Date: Sat, 3 Feb 2024 17:20:31 -0700 Subject: [PATCH] rpn.1: made more better --- docs/rpn.1 | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/rpn.1 b/docs/rpn.1 index 3067212..74642f8 100644 --- a/docs/rpn.1 +++ b/docs/rpn.1 @@ -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