forked from bonsai/harakit
rpn.1: fixed some clunky stuff
This commit is contained in:
parent
4e040e0021
commit
af53375ff2
17
docs/rpn.1
17
docs/rpn.1
@ -21,16 +21,16 @@ Rpn parses and and evaluates reverse polish notation expressions either from the
|
|||||||
standard input or by parsing its arguments. See the STANDARD INPUT section.
|
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
|
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
|
standard output. Any further specified numbers will be placed at the end of the
|
||||||
following the last outputted number.
|
stack.
|
||||||
|
|
||||||
For information on for reverse polish notation syntax, see rpn(7).
|
For information on for reverse polish notation syntax, see rpn(7).
|
||||||
|
|
||||||
.SH STANDARD INPUT
|
.SH STANDARD INPUT
|
||||||
|
|
||||||
If rpn is passed arguments, it interprets them as an expression to be evaluated.
|
If arguments are passed to rpn, it interprets them as an expression to be
|
||||||
Otherwise, it reads whitespace-delimited numbers and operations from the
|
evaluated. Otherwise, it reads whitespace-delimited numbers and operations from
|
||||||
standard input.
|
the standard input.
|
||||||
|
|
||||||
.SH DIAGNOSTICS
|
.SH DIAGNOSTICS
|
||||||
|
|
||||||
@ -42,13 +42,14 @@ as defined by sysexits.h(3) and print an error message.
|
|||||||
Due to precision constraints and the way floats are represented in accordance
|
Due to precision constraints and the way floats are represented in accordance
|
||||||
with the IEEE Standard for Floating Point Arithmetic (IEEE 754), floating-point
|
with the IEEE Standard for Floating Point Arithmetic (IEEE 754), floating-point
|
||||||
arithmetic has rounding errors. This is somewhat curbed by using the
|
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
|
machine epsilon as provided by the Rust standard library to which to round
|
||||||
numbers to before outputting.
|
numbers. Because of this, variation is expected in the number of decimal places
|
||||||
|
rpn can handle based on the platform and hardware of any given machine.
|
||||||
|
|
||||||
.SH RATIONALE
|
.SH RATIONALE
|
||||||
|
|
||||||
An infix notation calculation utility, bc(1p), is included in the POSIX
|
An infix notation calculation utility, bc(1p), is included in the POSIX
|
||||||
standard, but it doesn’t accept expressions as arguments; in scripts, any
|
standard, but does not accept expressions as arguments; in scripts, any
|
||||||
predefined, non-interactive input must be piped into the program. A dc(1)
|
predefined, non-interactive input must be piped into the program. A dc(1)
|
||||||
pre-dates the standardized bc(1p), the latter originally being a preprocessor
|
pre-dates the standardized bc(1p), the latter originally being a preprocessor
|
||||||
for the former, and was included in UNIX v2 onward. While it implements reverse
|
for the former, and was included in UNIX v2 onward. While it implements reverse
|
||||||
|
Loading…
Reference in New Issue
Block a user