| tman pages: use consistent formatting in examples - numtools - perform numerica… | |
| git clone git://src.adamsgaard.dk/numtools | |
| Log | |
| Files | |
| Refs | |
| README | |
| LICENSE | |
| --- | |
| commit 29ec796e11dfd5f8810c601efa2f71b694c5b5d3 | |
| parent 2ee4ea97b087bf7bdb4ee4da1ea668a48deafdbb | |
| Author: Anders Damsgaard <[email protected]> | |
| Date: Mon, 9 May 2022 16:05:30 +0200 | |
| man pages: use consistent formatting in examples | |
| Diffstat: | |
| M randcounts.1 | 3 --- | |
| M range.1 | 7 ------- | |
| M rangetest.1 | 3 --- | |
| M stddev.1 | 1 - | |
| M stdvar.1 | 1 - | |
| 5 files changed, 0 insertions(+), 15 deletions(-) | |
| --- | |
| diff --git a/randcounts.1 b/randcounts.1 | |
| t@@ -44,17 +44,14 @@ to generate reproducable binning. | |
| .Sh EXAMPLES | |
| Put one point in four bins with equal probability (25%). | |
| Due to the randomness, your output may differ: | |
| -.Pp | |
| .Dl $ randcounts 0.25 0.25 0.25 0.25 | |
| .Dl 0 1 0 0 | |
| .Pp | |
| Put 100 points in two bins with 75% and 25% probability, respectively: | |
| -.Pp | |
| .Dl $ randcounts -n 100 0.75 0.25 | |
| .Pp | |
| Put 100 points in three equal bins 1000 times, and calculate the average bin s… | |
| .Xr mean 1 : | |
| -.Pp | |
| .Dl $ randcounts -n 100 -r 1000 0.333 0.333 0.334 | mean | |
| .Dl 33.067 32.82 34.113 | |
| .Sh SEE ALSO | |
| diff --git a/range.1 b/range.1 | |
| t@@ -74,7 +74,6 @@ Print the spacing between numbers and exit. | |
| .El | |
| .Sh EXAMPLES | |
| Generate four equally-spaced numbers in the closed default range [0;1]: | |
| -.Pp | |
| .Dl $ range -n 4 | |
| .Dl 0 | |
| .Dl 0.33333 | |
| t@@ -84,7 +83,6 @@ Generate four equally-spaced numbers in the closed default r… | |
| Same as the previous example, but with full | |
| .Vt double | |
| precision on a 64-bit system: | |
| -.Pp | |
| .Dl $ range -n 4 -f '%.17g\en' 0 1 | |
| .Dl 0 | |
| .Dl 0.33333333333333331 | |
| t@@ -92,7 +90,6 @@ precision on a 64-bit system: | |
| .Dl 1 | |
| .Pp | |
| Generate four numbers in the range ]0;1[: | |
| -.Pp | |
| .Dl $ range -b -e -n 4 0 1 | |
| .Dl 0.2 | |
| .Dl 0.4 | |
| t@@ -100,26 +97,22 @@ Generate four numbers in the range ]0;1[: | |
| .Dl 0.8 | |
| .Pp | |
| Print ten numbers in the interval [1;10] with spaces between values: | |
| -.Pp | |
| .Dl $ range -f '%g ' 1 10 | |
| .Dl 1 2 3 4 5 6 7 8 9 10 | |
| .Pp | |
| Repeat and modify a string three times: | |
| -.Pp | |
| .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 | |
| .Pp | |
| Generate three numbers evenly distributed in logspace from 10^0 to 10^2: | |
| -.Pp | |
| .Dl $ range -l -n 3 0 2 | |
| .Dl 1 | |
| .Dl 10 | |
| .Dl 100 | |
| .Pp | |
| Generate three numbers in the range [-2;-1]: | |
| -.Pp | |
| .Dl $ range -n 3 -- -2 -1 | |
| .Dl -2 | |
| .Dl -1.5 | |
| diff --git a/rangetest.1 b/rangetest.1 | |
| t@@ -50,7 +50,6 @@ Given an example program "condfail", which always fails when… | |
| argument is equal or greater than 1.5, | |
| .Nm | |
| shows all parameter values which result in a successful invocation: | |
| -.Pp | |
| .Dl $ rangetest './condfail @VAL@' 0.0 10.0 2>/dev/null | |
| .Dl 0 | |
| .Dl 1.25 | |
| t@@ -59,7 +58,6 @@ shows all parameter values which result in a successful invo… | |
| .Dl 1.49414 | |
| .Pp | |
| The values associated with failed invocations are printed in standard error: | |
| -.Pp | |
| .Dl $ rangetest './condfail @VAL@' 0.0 10.0 >/dev/null | |
| .Dl 10 | |
| .Dl 5 | |
| t@@ -79,7 +77,6 @@ Find the minimum acceptable length | |
| for the program | |
| .Xr cngf-pf 1 , | |
| while surpressing its output: | |
| -.Pp | |
| .Dl $ ./rangetest 'cngf-pf -L @VAL@ -d 0.1 >/dev/null 2>&1' -2e-1 2e-1 2>/dev/… | |
| .Dl 0.2 | |
| .Dl 0.15 | |
| diff --git a/stddev.1 b/stddev.1 | |
| t@@ -22,7 +22,6 @@ Return the uncorrected sample standard deviation instead. | |
| .El | |
| .Sh EXAMPLES | |
| Compute the corrected standard deviation for some input numbers: | |
| -.Pp | |
| .Dl $ printf '10\en8\en10\en8\en8\en4\en' | stddev | |
| .Dl 2.1908902300206643 | |
| .Pp | |
| diff --git a/stdvar.1 b/stdvar.1 | |
| t@@ -22,7 +22,6 @@ Return the uncorrected sample standard variance instead. | |
| .El | |
| .Sh EXAMPLES | |
| Compute the corrected standard variance for some input numbers: | |
| -.Pp | |
| .Dl $ printf '10\en8\en10\en8\en8\en4\en' | stdvar | |
| .Dl 4.7999999999999998 | |
| .Pp |