numtools

perform numerical operations on vectors and matrices in unix pipes
git clone git://src.adamsgaard.dk/numtools # fast
git clone https://src.adamsgaard.dk/numtools.git # slow
Log | Files | Refs | README | LICENSE Back to index

commit b6aeff4f0628c5e338d7dfa71a5f9122a0e208c1
parent 47dfb68465e5d8948676267bebaaba332ad5c58f
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Mon,  2 May 2022 14:52:40 +0200

range.1: fix escaping of backslashes

Diffstat:
Mrange.1 | 25+++++++++++--------------
1 file changed, 11 insertions(+), 14 deletions(-)

diff --git a/range.1 b/range.1 @@ -21,9 +21,8 @@ .Sh DESCRIPTION .Nm generates floating-point numbers that are by default evenly distributed -in the linear, closed interval [ -.Ar min_val -, +in the linear, closed interval +.Ar [ min_val ; .Ar max_val ]. If .Ar max_val @@ -37,21 +36,19 @@ The options are as follows: .It Fl b Do not include .Ar min_val -as the first value, making it a half-open interval ] -.Ar min_val -, +as the first value, making it a half-open interval +.Ar ] min_val ; .Ar max_val ], or an entirely open interval when combined with -.Ar e . +.Op Ar e . .It Fl e Do not include .Ar max_val -as the last value, making it a half-open interval [ -.Ar min_val -, +as the last value, making it a half-open interval +.Ar [ min_val ; .Ar max_val [, or an entirely open interval when combined with -.Ar b . +.Op Ar b . .It Fl f Ar fmtstr Formatting string to use as documented in .Xr printf 3 . @@ -59,7 +56,7 @@ When including a format specifier (%..), only use forms that are compatible with .Vt double types. -The default format string is '%g\n'. +The default format string is '%g\en'. .It Fl h Show usage information. .It Fl l @@ -84,7 +81,7 @@ Same as the previous example, but with full .Vt double precision on a 64-bit system: .Pp -.Dl $ range -n 4 -f '%.17g\n' 0 1 +.Dl $ range -n 4 -f '%.17g\en' 0 1 .Dl 0 .Dl 0.33333333333333331 .Dl 0.66666666666666663 @@ -105,7 +102,7 @@ Print ten numbers in the interval [1;10] with spaces between values: .Pp Repeat and modify a string three times: .Pp -.Dl $ range -n 3 -f 'The best number is %.0g\n' 1 3 +.Dl $ range -n 3 -f 'The best number is %.0g\en' 1 3 .Dl The best number is 1 .Dl The best number is 2 .Dl The best number is 3