trangetest.1: improve description text and elaborate example - numtools - perfo… | |
git clone git://src.adamsgaard.dk/numtools | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 980e62e250ba67b8a2e89cf4160b85aa9c14372e | |
parent 474755078e89cc8f29f4eb1a493b7ed114fa50cc | |
Author: Anders Damsgaard <[email protected]> | |
Date: Sun, 12 Sep 2021 12:33:47 +0200 | |
rangetest.1: improve description text and elaborate example | |
Diffstat: | |
M rangetest.1 | 27 ++++++++++++++++++++------- | |
1 file changed, 20 insertions(+), 7 deletions(-) | |
--- | |
diff --git a/rangetest.1 b/rangetest.1 | |
t@@ -11,7 +11,8 @@ | |
.Ar max_val | |
.Sh DESCRIPTION | |
.Nm | |
-performs a binary search to test exit status from a | |
+performs a binary search to test the exit status from a child program | |
+invoked with | |
.Ar cmd , | |
where the first occurance of a string @VAL@ is substituted for | |
floating-point values in the search range from | |
t@@ -21,7 +22,8 @@ to | |
The search range is iteratively narrowed down to find a close | |
approximation of the threshold value where the | |
.Ar cmd | |
-transitions between succes to failure, as judged by its exit status. | |
+transitions between succes to failure, as judged by the child program | |
+exit status. | |
.Pp | |
The behavior of | |
.Ar cmd | |
t@@ -44,18 +46,29 @@ The output of | |
is also shown, unless it is surpressed by redirecting its output | |
with ">/dev/null 2>&1". | |
.Sh EXAMPLES | |
-Given an example program "condfail" which always fails when its | |
-first argument is less than 1.5, show all parameter values which | |
-result in a successful invocation of | |
-.Ar cmd : | |
+Given an example program "condfail", which always fails when its first | |
+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 | |
+.Dl $ rangetest './condfail @VAL@' 0.0 10.0 2>/dev/null | |
.Dl 0 | |
.Dl 1.25 | |
.Dl 1.40625 | |
.Dl 1.48438 | |
.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 | |
+.Dl 2.5 | |
+.Dl 1.875 | |
+.Dl 1.5625 | |
+.Dl 1.52344 | |
+.Dl 1.50391 | |
+.Pp | |
While the above values all result in a successful invocation of | |
.Ar cmd , | |
.Nm |