Lines Matching +full:non +full:- +full:zero
2 .\" SPDX-License-Identifier: BSD-2-Clause
4 .\" Copyright (c) 2018-2024 Gavin D. Howard and contributors.
32 dc \- arbitrary\-precision decimal reverse\-Polish notation calculator
34 \f[B]dc\f[R] [\f[B]\-cChiPRvVx\f[R]] [\f[B]\-\-version\f[R]]
35 [\f[B]\-\-help\f[R]] [\f[B]\-\-digit\-clamp\f[R]]
36 [\f[B]\-\-no\-digit\-clamp\f[R]] [\f[B]\-\-interactive\f[R]]
37 [\f[B]\-\-no\-prompt\f[R]] [\f[B]\-\-no\-read\-prompt\f[R]]
38 [\f[B]\-\-extended\-register\f[R]] [\f[B]\-e\f[R] \f[I]expr\f[R]]
39 [\f[B]\-\-expression\f[R]=\f[I]expr\f[R]\&...]
40 [\f[B]\-f\f[R] \f[I]file\f[R]\&...]
41 [\f[B]\-\-file\f[R]=\f[I]file\f[R]\&...]
43 [\f[B]\-I\f[R] \f[I]ibase\f[R]] [\f[B]\-\-ibase\f[R]=\f[I]ibase\f[R]]
44 [\f[B]\-O\f[R] \f[I]obase\f[R]] [\f[B]\-\-obase\f[R]=\f[I]obase\f[R]]
45 [\f[B]\-S\f[R] \f[I]scale\f[R]] [\f[B]\-\-scale\f[R]=\f[I]scale\f[R]]
46 [\f[B]\-E\f[R] \f[I]seed\f[R]] [\f[B]\-\-seed\f[R]=\f[I]seed\f[R]]
48 dc(1) is an arbitrary\-precision calculator.
54 If no files are given on the command\-line, then dc(1) reads from
61 \f[B]10\f[R], they can set \f[B]DC_ENV_ARGS\f[R] to \f[B]\-e 10k\f[R],
66 \f[B]\-C\f[R], \f[B]\-\-no\-digit\-clamp\f[R]
76 If this and/or the \f[B]\-c\f[R] or \f[B]\-\-digit\-clamp\f[R] options
81 can be queried with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
83 This is a \f[B]non\-portable extension\f[R].
86 \f[B]\-c\f[R], \f[B]\-\-digit\-clamp\f[R]
97 If this and/or the \f[B]\-C\f[R] or \f[B]\-\-no\-digit\-clamp\f[R]
102 can be queried with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
104 This is a \f[B]non\-portable extension\f[R].
107 \f[B]\-E\f[R] \f[I]seed\f[R], \f[B]\-\-seed\f[R]=\f[I]seed\f[R]
115 This is a \f[B]non\-portable extension\f[R].
118 \f[B]\-e\f[R] \f[I]expr\f[R], \f[B]\-\-expression\f[R]=\f[I]expr\f[R]
127 If this option is given on the command\-line (i.e., not in
130 \f[B]\-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to
131 \f[B]\-f\f[R] or \f[B]\-\-file\f[R], whether on the command\-line or in
133 However, if any other \f[B]\-e\f[R], \f[B]\-\-expression\f[R],
134 \f[B]\-f\f[R], or \f[B]\-\-file\f[R] arguments are given after
135 \f[B]\-f\-\f[R] or equivalent is given, dc(1) will give a fatal error
138 This is a \f[B]non\-portable extension\f[R].
141 \f[B]\-f\f[R] \f[I]file\f[R], \f[B]\-\-file\f[R]=\f[I]file\f[R]
148 If this option is given on the command\-line (i.e., not in
151 \f[B]\-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to
152 \f[B]\-f\f[R] or \f[B]\-\-file\f[R].
153 However, if any other \f[B]\-e\f[R], \f[B]\-\-expression\f[R],
154 \f[B]\-f\f[R], or \f[B]\-\-file\f[R] arguments are given after
155 \f[B]\-f\-\f[R] or equivalent is given, dc(1) will give a fatal error
158 This is a \f[B]non\-portable extension\f[R].
161 \f[B]\-h\f[R], \f[B]\-\-help\f[R]
164 \f[B]\-I\f[R] \f[I]ibase\f[R], \f[B]\-\-ibase\f[R]=\f[I]ibase\f[R]
172 This is a \f[B]non\-portable extension\f[R].
175 \f[B]\-i\f[R], \f[B]\-\-interactive\f[R]
180 This is a \f[B]non\-portable extension\f[R].
183 \f[B]\-L\f[R], \f[B]\-\-no\-line\-length\f[R]
190 This is a \f[B]non\-portable extension\f[R].
193 \f[B]\-O\f[R] \f[I]obase\f[R], \f[B]\-\-obase\f[R]=\f[I]obase\f[R]
201 This is a \f[B]non\-portable extension\f[R].
204 \f[B]\-P\f[R], \f[B]\-\-no\-prompt\f[R]
217 This is a \f[B]non\-portable extension\f[R].
220 \f[B]\-R\f[R], \f[B]\-\-no\-read\-prompt\f[R]
239 This is a \f[B]non\-portable extension\f[R].
242 \f[B]\-S\f[R] \f[I]scale\f[R], \f[B]\-\-scale\f[R]=\f[I]scale\f[R]
250 This is a \f[B]non\-portable extension\f[R].
253 \f[B]\-v\f[R], \f[B]\-V\f[R], \f[B]\-\-version\f[R]
256 \f[B]\-x\f[R] \f[B]\-\-extended\-register\f[R]
262 This is a \f[B]non\-portable extension\f[R].
265 \f[B]\-z\f[R], \f[B]\-\-leading\-zeroes\f[R]
266 Makes dc(1) print all numbers greater than \f[B]\-1\f[R] and less than
267 \f[B]1\f[R], and not equal to \f[B]0\f[R], with a leading zero.
270 This is a \f[B]non\-portable extension\f[R].
273 All long options are \f[B]non\-portable extensions\f[R].
275 If no files are given on the command\-line and no files or expressions
276 are given by the \f[B]\-f\f[R], \f[B]\-\-file\f[R], \f[B]\-e\f[R], or
277 \f[B]\-\-expression\f[R] options, then dc(1) reads from \f[B]stdin\f[R].
287 Any non\-error output is written to \f[B]stdout\f[R].
295 \f[B]dc >&\-\f[R], it will quit with an error.
308 \f[B]dc 2>&\-\f[R], it will quit with an error.
345 \f[B]non\-portable extensions\f[R].
357 pseudo\-random number generator.
359 is assigned to \f[B]seed\f[R] later, the pseudo\-random number generator
360 is guaranteed to produce the same sequence of pseudo\-random numbers
364 of pseudo\-random numbers.
374 \f[B]Note\f[R]: The values returned by the pseudo\-random number
377 This is a consequence of using a seeded pseudo\-random number generator.
380 This means that the pseudo\-random values from dc(1) should only be used
381 where a reproducible stream of pseudo\-random numbers is
383 In any other case, use a non\-seeded pseudo\-random number generator.
385 The pseudo\-random number generator, \f[B]seed\f[R], and all associated
386 operations are \f[B]non\-portable extensions\f[R].
389 This is a \f[B]non\-portable extension\f[R].
400 the \f[B]\-c\f[R]/\f[B]\-\-digit\-clamp\f[R] or
401 \f[B]\-C\f[R]/\f[B]\-\-no\-digit\-clamp\f[R] options (see the
405 \f[B]\-h\f[R]/\f[B]\-\-help\f[R] option.
423 There is one exception to clamping: single\-character numbers (i.e.,
435 leading zero, i.e., for \f[B]A\f[R], use \f[B]0A\f[R].
454 Accepting input as scientific notation is a \f[B]non\-portable
470 \f[B]non\-portable extension\f[R].
490 digit is interpreted as an 8\-bit ASCII character, making it a byte
495 This is a \f[B]non\-portable extension\f[R].
514 \f[B]\-\f[R]
535 The first value popped off of the stack must be non\-zero.
545 \f[B]a\-(a/b)*b\f[R] to \f[I]scale\f[R]
548 The first value popped off of the stack must be non\-zero.
559 The first value popped off of the stack must be non\-zero.
561 This is a \f[B]non\-portable extension\f[R].
572 non\-zero.
581 The value popped off of the stack must be non\-negative.
591 This behavior without a number is a \f[B]non\-portable extension\f[R].
595 The top value is popped off the stack, and if it is zero, it is pushed
600 This is a \f[B]non\-portable extension\f[R].
609 integer and non\-zero.
611 and non\-negative.
614 This is a \f[B]non\-portable extension\f[R].
622 This is a \f[B]non\-portable extension\f[R].
632 non\-negative.
634 This is a \f[B]non\-portable extension\f[R].
643 non\-negative.
645 This is a \f[B]non\-portable extension\f[R].
654 non\-negative.
656 This is a \f[B]non\-portable extension\f[R].
664 This is a \f[B]non\-portable extension\f[R].
672 This is a \f[B]non\-portable extension\f[R].
681 This is a \f[B]non\-portable extension\f[R].
690 This is a \f[B]non\-portable extension\f[R].
699 This is a \f[B]non\-portable extension\f[R].
708 This is a \f[B]non\-portable extension\f[R].
713 If they are both non\-zero, a \f[B]1\f[R] is pushed onto the stack.
714 If either of them is zero, or both of them are, then a \f[B]0\f[R] is
719 a short\-circuit operator.
721 This is a \f[B]non\-portable extension\f[R].
726 If at least one of them is non\-zero, a \f[B]1\f[R] is pushed onto the
728 If both of them are zero, then a \f[B]0\f[R] is pushed onto the stack.
732 a short\-circuit operator.
734 This is a \f[B]non\-portable extension\f[R].
736 .SS Pseudo\-Random Number Generator
737 dc(1) has a built\-in pseudo\-random number generator.
738 These commands query the pseudo\-random number generator.
740 controls the pseudo\-random number generator.)
742 The pseudo\-random number generator is guaranteed to \f[B]NOT\f[R] be
751 limitations of the pseudo\-random number generator.
753 This is a \f[B]non\-portable extension\f[R].
759 If the bound is negative or is a non\-integer, an error is raised, and
763 honored by generating several pseudo\-random integers, multiplying them
775 limitations of the pseudo\-random number generator.
777 This is a \f[B]non\-portable extension\f[R].
843 \f[B]scale\f[R], which must be non\-negative.
853 The meaning of \f[B]seed\f[R] is dependent on the current pseudo\-random
861 pseudo\-random number generator is guaranteed to produce the same
862 sequence of pseudo\-random numbers as it did when the \f[B]seed\f[R]
869 same sequence of pseudo\-random numbers.
871 produce unique sequences of pseudo\-random numbers.
876 This is a \f[B]non\-portable extension\f[R].
892 This is a \f[B]non\-portable extension\f[R].
900 This is a \f[B]non\-portable extension\f[R].
908 This is a \f[B]non\-portable extension\f[R].
916 This is a \f[B]non\-portable extension\f[R].
921 \f[B]\[cq]\f[R] pseudo\-random number generator command.
924 This is a \f[B]non\-portable extension\f[R].
964 one\-character string where the character is the result of the mod
970 create the new string as a one\-character string.
973 This is a \f[B]non\-portable extension\f[R].
1009 This is a \f[B]non\-portable extension\f[R].
1030 This is a \f[B]non\-portable extension\f[R].
1051 This is a \f[B]non\-portable extension\f[R].
1072 This is a \f[B]non\-portable extension\f[R].
1093 This is a \f[B]non\-portable extension\f[R].
1114 This is a \f[B]non\-portable extension\f[R].
1127 Pops a value from the stack which must be non\-negative and is used the
1140 This is a \f[B]non\-portable extension\f[R].
1173 This is a \f[B]non\-portable extension\f[R].
1182 This is a \f[B]non\-portable extension\f[R].
1200 This is a \f[B]non\-portable extension\f[R].
1219 This is a \f[B]non\-portable extension\f[R].
1240 Pushes \f[B]0\f[R] onto the stack if the leading zero setting has not
1241 been enabled with the \f[B]\-z\f[R] or \f[B]\-\-leading\-zeroes\f[R]
1242 options (see the \f[B]OPTIONS\f[R] section), non\-zero otherwise.
1253 In non\-extended register mode, a register name is just the single
1262 If extended register mode is enabled (\f[B]\-x\f[R] or
1263 \f[B]\-\-extended\-register\f[R] command\-line arguments are given),
1270 \f[B][a\-z][a\-z0\-9_]*\f[R] (like bc(1) identifiers), and it is a parse
1271 error if the next non\-space characters do not match that regex.
1273 When dc(1) encounters an error or a signal that it has a non\-default
1340 Set at \f[B]SIZE_MAX\-1\f[R].
1344 Set at \f[B]DC_OVERFLOW_MAX\-1\f[R].
1348 Set at \f[B]DC_OVERFLOW_MAX\-1\f[R].
1352 Set at \f[B]DC_OVERFLOW_MAX\-1\f[R].
1357 Set at \f[B]DC_OVERFLOW_MAX\-1\f[R].
1362 Set at \f[B]2\[ha]DC_LONG_BIT\-1\f[R].
1370 Set at \f[B]SIZE_MAX\-1\f[R].
1372 These limits are meant to be effectively non\-existent; the limits are
1373 so large (at least on 64\-bit machines) that there should not be any
1377 As \f[B]non\-portable extensions\f[R], dc(1) recognizes the following
1381 This is another way to give command\-line arguments to dc(1).
1382 They should be in the same format as all other command\-line arguments.
1385 on the command\-line.
1390 Another use would be to use the \f[B]\-e\f[R] option to set
1408 parsing, though such files are still supported on the command\-line
1415 (\f[B]2\[ha]16\-1\f[R]), dc(1) will output lines to that length,
1432 variable exists and contains an integer, a non\-zero value makes dc(1)
1433 reset on \f[B]SIGINT\f[R], rather than exit, and zero makes dc(1) exit.
1438 with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
1447 exists and contains an integer, then a non\-zero value makes dc(1) use
1448 TTY mode, and zero makes dc(1) not use TTY mode.
1451 with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
1460 exists and contains an integer, a non\-zero value makes dc(1) use a
1461 prompt, and zero or a non\-integer makes dc(1) not use a prompt.
1468 \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
1472 If any expressions or expression files are given on the command\-line
1473 with \f[B]\-e\f[R], \f[B]\-\-expression\f[R], \f[B]\-f\f[R], or
1474 \f[B]\-\-file\f[R], then if this environment variable exists and
1475 contains an integer, a non\-zero value makes dc(1) exit after executing
1476 the expressions and expression files, and a zero value makes dc(1) not
1481 with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
1486 contains an integer, a non\-zero value makes dc(1) clamp digits that are
1488 digits are considered equal to the \f[B]ibase\f[R] minus 1, and a zero
1493 This never applies to single\-digit numbers, as per the bc(1) standard
1497 with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
1513 pseudo\-random number generator, attempting to convert a negative number
1516 to use a non\-integer where an integer is required.
1551 directory as a file, and giving invalid command\-line options.
1562 \f[B]\-i\f[R] flag or \f[B]\-\-interactive\f[R] option.
1566 \f[B]\-i\f[R] flag or \f[B]\-\-interactive\f[R] option.
1568 Like bc(1), dc(1) has an interactive mode and a non\-interactive mode.
1570 and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]\-i\f[R]
1571 flag and \f[B]\-\-interactive\f[R] option can turn it on in other
1588 that environment variable contains a non\-zero integer, dc(1) will turn
1592 \f[I]not\f[R] a non\-zero integer, then dc(1) will not turn TTY mode on.
1596 The default setting can be queried with the \f[B]\-h\f[R] or
1597 \f[B]\-\-help\f[R] options.
1603 .SS Command\-Line History
1604 Command\-line history is only enabled if TTY mode is, i.e., that
1617 non\-zero integer, then the prompt is turned on when \f[B]stdin\f[R],
1619 \f[B]\-P\f[R] and \f[B]\-\-no\-prompt\f[R] options were not used.
1621 the \f[B]\-R\f[R] and \f[B]\-\-no\-read\-prompt\f[R] options must also
1626 the \f[B]\-P\f[R] and \f[B]\-\-no\-prompt\f[R] options, and the
1627 \f[B]\-R\f[R] and \f[B]\-\-no\-read\-prompt\f[R] options.
1636 an integer or it is zero, dc(1) will exit.
1639 \f[B]DC_SIGINT_RESET\f[R] or its default is an integer and non\-zero,
1665 dc(1) supports interactive command\-line editing.
1669 This means that command\-line history can only be enabled when
1682 operators in the IEEE Std 1003.1\-2017 (\[lq]POSIX.1\-2017\[rq]) bc(1)