Lines Matching +full:all +full:- +full:outputs +full:- +full:2
2 .\" SPDX-License-Identifier: BSD-2-Clause
4 .\" Copyright (c) 2018-2024 Gavin D. Howard and contributors.
32 bc \- arbitrary\-precision decimal arithmetic language and calculator
34 \f[B]bc\f[R] [\f[B]\-cCghilPqRsvVw\f[R]] [\f[B]\-\-digit\-clamp\f[R]]
35 [\f[B]\-\-no\-digit\-clamp\f[R]] [\f[B]\-\-global\-stacks\f[R]]
36 [\f[B]\-\-help\f[R]] [\f[B]\-\-interactive\f[R]] [\f[B]\-\-mathlib\f[R]]
37 [\f[B]\-\-no\-prompt\f[R]] [\f[B]\-\-no\-read\-prompt\f[R]]
38 [\f[B]\-\-quiet\f[R]] [\f[B]\-\-standard\f[R]] [\f[B]\-\-warn\f[R]]
39 [\f[B]\-\-version\f[R]] [\f[B]\-e\f[R] \f[I]expr\f[R]]
40 [\f[B]\-\-expression\f[R]=\f[I]expr\f[R]\&...]
41 [\f[B]\-f\f[R] \f[I]file\f[R]\&...]
42 [\f[B]\-\-file\f[R]=\f[I]file\f[R]\&...]
44 [\f[B]\-I\f[R] \f[I]ibase\f[R]] [\f[B]\-\-ibase\f[R]=\f[I]ibase\f[R]]
45 [\f[B]\-O\f[R] \f[I]obase\f[R]] [\f[B]\-\-obase\f[R]=\f[I]obase\f[R]]
46 [\f[B]\-S\f[R] \f[I]scale\f[R]] [\f[B]\-\-scale\f[R]=\f[I]scale\f[R]]
47 [\f[B]\-E\f[R] \f[I]seed\f[R]] [\f[B]\-\-seed\f[R]=\f[I]seed\f[R]]
53 somewhat C\-like, but there are differences.
59 This bc(1) is a drop\-in replacement for \f[I]any\f[R] bc(1), including
68 To fix that, use the command\-line option \f[B]\-r\f[R]
79 \f[B]\-C\f[R], \f[B]\-\-no\-digit\-clamp\f[R]
89 If this and/or the \f[B]\-c\f[R] or \f[B]\-\-digit\-clamp\f[R] options
94 can be queried with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
96 This is a \f[B]non\-portable extension\f[R].
99 \f[B]\-c\f[R], \f[B]\-\-digit\-clamp\f[R]
110 If this and/or the \f[B]\-C\f[R] or \f[B]\-\-no\-digit\-clamp\f[R]
115 can be queried with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
117 This is a \f[B]non\-portable extension\f[R].
120 \f[B]\-E\f[R] \f[I]seed\f[R], \f[B]\-\-seed\f[R]=\f[I]seed\f[R]
128 This is a \f[B]non\-portable extension\f[R].
131 \f[B]\-e\f[R] \f[I]expr\f[R], \f[B]\-\-expression\f[R]=\f[I]expr\f[R]
134 If files are given as well (see the \f[B]\-f\f[R] and \f[B]\-\-file\f[R]
140 If this option is given on the command\-line (i.e., not in
142 then after processing all expressions and files, bc(1) will exit, unless
143 \f[B]\-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to
144 \f[B]\-f\f[R] or \f[B]\-\-file\f[R], whether on the command\-line or in
146 However, if any other \f[B]\-e\f[R], \f[B]\-\-expression\f[R],
147 \f[B]\-f\f[R], or \f[B]\-\-file\f[R] arguments are given after
148 \f[B]\-f\-\f[R] or equivalent is given, bc(1) will give a fatal error
151 This is a \f[B]non\-portable extension\f[R].
154 \f[B]\-f\f[R] \f[I]file\f[R], \f[B]\-\-file\f[R]=\f[I]file\f[R]
157 If expressions are also given (see the \f[B]\-e\f[R] and
158 \f[B]\-\-expression\f[R] options), the expressions are evaluated in the
162 If this option is given on the command\-line (i.e., not in
164 then after processing all expressions and files, bc(1) will exit, unless
165 \f[B]\-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to
166 \f[B]\-f\f[R] or \f[B]\-\-file\f[R].
167 However, if any other \f[B]\-e\f[R], \f[B]\-\-expression\f[R],
168 \f[B]\-f\f[R], or \f[B]\-\-file\f[R] arguments are given after
169 \f[B]\-f\-\f[R] or equivalent is given, bc(1) will give a fatal error
172 This is a \f[B]non\-portable extension\f[R].
175 \f[B]\-g\f[R], \f[B]\-\-global\-stacks\f[R]
180 This has the effect that a copy of the current value of all four are
183 This means that functions can assign to any and all of those globals
224 alias d2o=\[dq]bc \-e ibase=A \-e obase=8\[dq]
225 alias h2b=\[dq]bc \-e ibase=G \-e obase=2\[dq]
236 This means that the sequence of pseudo\-random numbers that they see
237 will not be the same sequence of pseudo\-random numbers that any parent
241 If a function desires to not affect the sequence of pseudo\-random
254 If \f[B]\-s\f[R], \f[B]\-w\f[R], or any equivalents are used, this
257 This is a \f[B]non\-portable extension\f[R].
260 \f[B]\-h\f[R], \f[B]\-\-help\f[R]
263 \f[B]\-I\f[R] \f[I]ibase\f[R], \f[B]\-\-ibase\f[R]=\f[I]ibase\f[R]
271 This is a \f[B]non\-portable extension\f[R].
274 \f[B]\-i\f[R], \f[B]\-\-interactive\f[R]
279 This is a \f[B]non\-portable extension\f[R].
282 \f[B]\-L\f[R], \f[B]\-\-no\-line\-length\f[R]
289 This is a \f[B]non\-portable extension\f[R].
292 \f[B]\-l\f[R], \f[B]\-\-mathlib\f[R]
302 \f[B]\-O\f[R] \f[I]obase\f[R], \f[B]\-\-obase\f[R]=\f[I]obase\f[R]
310 This is a \f[B]non\-portable extension\f[R].
313 \f[B]\-P\f[R], \f[B]\-\-no\-prompt\f[R]
326 This is a \f[B]non\-portable extension\f[R].
329 \f[B]\-q\f[R], \f[B]\-\-quiet\f[R]
331 (https://www.gnu.org/software/bc/); it is a no\-op.
334 \f[B]\-v\f[R], \f[B]\-V\f[R], or \f[B]\-\-version\f[R] options are given
336 a non\-zero integer or if this bc(1) was built with the header displayed
342 This is a \f[B]non\-portable extension\f[R].
345 \f[B]\-R\f[R], \f[B]\-\-no\-read\-prompt\f[R]
358 is only used when the \f[B]read()\f[R] built\-in function is called.
364 This is a \f[B]non\-portable extension\f[R].
367 \f[B]\-r\f[R] \f[I]keyword\f[R], \f[B]\-\-redefine\f[R]=\f[I]keyword\f[R]
375 .IP \[bu] 2
377 .IP \[bu] 2
379 .IP \[bu] 2
381 .IP \[bu] 2
383 .IP \[bu] 2
385 .IP \[bu] 2
387 .IP \[bu] 2
389 .IP \[bu] 2
391 .IP \[bu] 2
393 .IP \[bu] 2
395 .IP \[bu] 2
397 .IP \[bu] 2
399 .IP \[bu] 2
401 .IP \[bu] 2
403 .IP \[bu] 2
405 .IP \[bu] 2
407 .IP \[bu] 2
409 .IP \[bu] 2
411 .IP \[bu] 2
416 If multiple are used, use this option for all of them; it can be used
428 \f[B]\-S\f[R] \f[I]scale\f[R], \f[B]\-\-scale\f[R]=\f[I]scale\f[R]
436 This is a \f[B]non\-portable extension\f[R].
439 \f[B]\-s\f[R], \f[B]\-\-standard\f[R]
444 This is a \f[B]non\-portable extension\f[R].
447 \f[B]\-v\f[R], \f[B]\-V\f[R], \f[B]\-\-version\f[R]
451 This is a \f[B]non\-portable extension\f[R].
454 \f[B]\-w\f[R], \f[B]\-\-warn\f[R]
455 Like \f[B]\-s\f[R] and \f[B]\-\-standard\f[R], except that warnings (and
456 not errors) are printed for non\-standard extensions and execution
460 This is a \f[B]non\-portable extension\f[R].
463 \f[B]\-z\f[R], \f[B]\-\-leading\-zeroes\f[R]
464 Makes bc(1) print all numbers greater than \f[B]\-1\f[R] and less than
472 This is a \f[B]non\-portable extension\f[R].
475 All long options are \f[B]non\-portable extensions\f[R].
477 If no files or expressions are given by the \f[B]\-f\f[R],
478 \f[B]\-\-file\f[R], \f[B]\-e\f[R], or \f[B]\-\-expression\f[R] options,
493 Any non\-error output is written to \f[B]stdout\f[R].
501 \f[B]bc >&\-\f[R], it will quit with an error.
514 \f[B]bc 2>&\-\f[R], it will quit with an error.
522 The syntax for bc(1) programs is mostly C\-like, with some differences.
526 This section is meant to be a summary and a listing of all the
533 followed by any number (up to \f[B]BC_NAME_MAX\-1\f[R]) of lowercase
534 letters (\f[B]a\-z\f[R]), digits (\f[B]0\-9\f[R]), and underscores
536 The regex is \f[B][a\-z][a\-z0\-9_]*\f[R].
538 \f[B]non\-portable extension\f[R].
545 If the \f[B]\-s\f[R] (\f[B]\-\-standard\f[R]) and \f[B]\-w\f[R]
546 (\f[B]\-\-warn\f[R]) flags were not given on the command line, the max
549 The min allowable value for \f[B]ibase\f[R] is \f[B]2\f[R].
551 programs with the \f[B]maxibase()\f[R] built\-in function.
558 can be queried in bc(1) programs with the \f[B]maxobase()\f[R] built\-in
567 \f[B]non\-portable extensions\f[R].
577 built\-in function.
602 These are \f[B]non\-portable extensions\f[R].
609 .IP "2." 3
612 This is a \f[B]non\-portable extension\f[R].
617 .IP "2." 3
630 Numbers 6 and 7 are \f[B]non\-portable extensions\f[R].
632 The meaning of \f[B]seed\f[R] is dependent on the current pseudo\-random
639 and used again, the pseudo\-random number generator is guaranteed to
640 produce the same sequence of pseudo\-random numbers as it did when the
647 same sequence of pseudo\-random numbers.
649 \f[I]not\f[R] produce unique sequences of pseudo\-random numbers.
661 a user can have a variable, array, and function that all have the same
673 .IP " 2." 4
679 \f[B]E\f[R] must be non\-negative.
685 Passing a string to \f[B]length(E)\f[R] is a \f[B]non\-portable
689 This is a \f[B]non\-portable extension\f[R].
694 This is a \f[B]non\-portable extension\f[R].
698 This is a \f[B]non\-portable extension\f[R].
702 This is a \f[B]non\-portable extension\f[R].
708 The second argument must be non\-negative.
709 The third argument must be non\-zero.
710 This is a \f[B]non\-portable extension\f[R].
715 which must be non\-zero.
718 This is a \f[B]non\-portable extension\f[R].
723 that number as a one\-character string.
724 This is a \f[B]non\-portable extension\f[R].
729 This allows creating multi\-character strings and storing them.
730 This is a \f[B]non\-portable extension\f[R].
733 \f[B]I\f[R] is an identifier for a non\-\f[B]void\f[R] function (see the
745 This is a \f[B]non\-portable extension\f[R].
748 This is a \f[B]non\-portable extension\f[R].
751 This is a \f[B]non\-portable extension\f[R].
754 This is a \f[B]non\-portable extension\f[R].
759 This is a \f[B]non\-portable extension\f[R].
762 with the \f[B]\-g\f[R] or \f[B]\-\-global\-stacks\f[R] options,
763 non\-zero otherwise.
765 This is a \f[B]non\-portable extension\f[R].
768 with the \f[B]\-z\f[R] or \f[B]\[en]leading\-zeroes\f[R] options,
769 non\-zero otherwise.
771 This is a \f[B]non\-portable extension\f[R].
773 \f[B]rand()\f[R]: A pseudo\-random integer between \f[B]0\f[R]
776 This is a \f[B]non\-portable extension\f[R].
778 \f[B]irand(E)\f[R]: A pseudo\-random integer between \f[B]0\f[R]
780 If \f[B]E\f[R] is negative or is a non\-integer (\f[B]E\f[R]\[cq]s
785 honored by generating several pseudo\-random integers, multiplying them
794 This is a \f[B]non\-portable extension\f[R].
797 This is a \f[B]non\-portable extension\f[R].
801 the pseudo\-random number generator.
803 \f[B]Note\f[R]: The values returned by the pseudo\-random number
806 This is a consequence of using a seeded pseudo\-random number generator.
809 This means that the pseudo\-random values from bc(1) should only be used
810 where a reproducible stream of pseudo\-random numbers is
812 In any other case, use a non\-seeded pseudo\-random number generator.
824 the \f[B]\-c\f[R]/\f[B]\-\-digit\-clamp\f[R] or
825 \f[B]\-C\f[R]/\f[B]\-\-no\-digit\-clamp\f[R] options (see the
829 \f[B]\-h\f[R]/\f[B]\-\-help\f[R] option.
844 \f[B]AB\f[R] is equal to \f[B]3\[ha]1*2+3\[ha]0*2\f[R], which is
845 \f[B]3\f[R] times \f[B]2\f[R] plus \f[B]2\f[R], or \f[B]8\f[R].
847 There is one exception to clamping: single\-character numbers (i.e.,
866 Negative exponents are also allowed, so \f[B]4.2890e\-3\f[R] is equal to
869 Using scientific notation is an error or warning if the \f[B]\-s\f[R] or
870 \f[B]\-w\f[R], respectively, command\-line options (or equivalents) are
880 \f[B]10e\-4\f[R], the resulting decimal number will be \f[B]0.0016\f[R].
882 Accepting input as scientific notation is a \f[B]non\-portable
889 \f[B]++\f[R] \f[B]\-\-\f[R]
898 \f[B]\-\f[R] \f[B]!\f[R]
943 \f[B]+\f[R] \f[B]\-\f[R]
961 \f[B]=\f[R] \f[B]<<=\f[R] \f[B]>>=\f[R] \f[B]+=\f[R] \f[B]\-=\f[R] \f[B]*=\f[R] \f[B]/=\f[R] \f[B]%…
999 \f[B]++\f[R] \f[B]\-\-\f[R]
1010 \f[B]\-\f[R]
1024 This is a \f[B]non\-portable extension\f[R].
1029 with all of its \f[I]scale\f[R] removed.
1032 This is a \f[B]non\-portable extension\f[R].
1046 non\-negative.
1048 This is a \f[B]non\-portable extension\f[R].
1059 is negative, the first value must be non\-zero.
1077 The second expression must be non\-zero.
1083 \f[B]scale\f[R] and 2) Using the result of step 1 to calculate
1084 \f[B]a\-(a/b)*b\f[R] to \f[I]scale\f[R]
1088 The second expression must be non\-zero.
1096 \f[B]\-\f[R]
1108 non\-negative.
1110 This is a \f[B]non\-portable extension\f[R].
1120 non\-negative.
1122 This is a \f[B]non\-portable extension\f[R].
1125 \f[B]=\f[R] \f[B]<<=\f[R] \f[B]>>=\f[R] \f[B]+=\f[R] \f[B]\-=\f[R] \f[B]*=\f[R] \f[B]/=\f[R] \f[B]%…
1133 For all others, \f[B]a\f[R] and \f[B]b\f[R] are applied as operands to
1138 extensions are themselves \f[B]non\-portable extensions\f[R].
1155 This allowance is a \f[B]non\-portable extension\f[R].
1160 \f[B]1\f[R] if both expressions are non\-zero, \f[B]0\f[R] otherwise.
1163 This is \f[I]not\f[R] a short\-circuit operator.
1165 This is a \f[B]non\-portable extension\f[R].
1170 \f[B]1\f[R] if one of the expressions is non\-zero, \f[B]0\f[R]
1174 This is \f[I]not\f[R] a short\-circuit operator.
1176 This is a \f[B]non\-portable extension\f[R].
1182 .IP " 2." 4
1225 Numbers 4, 9, 11, 12, 14, 15, and 16 are \f[B]non\-portable
1228 Also, as a \f[B]non\-portable extension\f[R], any or all of the
1245 branch that will not be executed (it is a compile\-time command).
1261 print \f[B]0\f[R], \f[B]1\f[R], and \f[B]2\f[R] on successive lines
1270 This is like the \f[B]quit\f[R] statement in that it is a compile\-time
1283 run with either the \f[B]\-s\f[R] or \f[B]\-w\f[R] command\-line options
1287 \f[B]non\-portable extension\f[R].
1305 functions are \f[B]non\-portable extensions\f[R].
1333 character to be printed as\-is.
1335 Any non\-string expression in a print statement shall be assigned to
1348 and each digit is interpreted as an 8\-bit ASCII character, making it a
1361 \f[B]i\f[R] is equal to \f[B]2\f[R] at the end of the expression.
1373 \f[B]2\f[R] before the function starts executing.
1394 As a \f[B]non\-portable extension\f[R], the opening brace of a
1397 As a \f[B]non\-portable extension\f[R], the return statement may also be
1401 .IP "2." 3
1433 This is a \f[B]non\-portable extension\f[R].
1446 Other than this, all function arguments are passed by value.
1448 This is a \f[B]non\-portable extension\f[R].
1452 available when the \f[B]\-l\f[R] or \f[B]\-\-mathlib\f[R] command\-line
1454 when the \f[B]\-s\f[R] option, the \f[B]\-w\f[R] option, or equivalents
1510 \f[B]\-s\f[R]/\f[B]\-\-standard\f[R] or \f[B]\-w\f[R]/\f[B]\-\-warn\f[R]
1514 The extended library is a \f[B]non\-portable extension\f[R].
1565 Returns the logarithm base \f[B]2\f[R] of \f[B]x\f[R].
1635 \f[B]0\f[R], it returns \f[B]a(y/x)\-pi\f[R].
1637 \f[B]0\f[R], it returns \f[B]pi/2\f[R].
1639 \f[B]0\f[R], it returns \f[B]\-pi/2\f[R].
1673 If \f[B]x\f[R] is equal to \f[B]1\f[R] or \f[B]\-1\f[R], this raises an
1701 \f[B]0\f[R], it returns \f[B]a(y/x)\-pi\f[R].
1703 \f[B]0\f[R], it returns \f[B]pi/2\f[R].
1705 \f[B]0\f[R], it returns \f[B]\-pi/2\f[R].
1734 Generates a pseudo\-random number between \f[B]0\f[R] (inclusive) and
1743 Generates a pseudo\-random number that is between \f[B]0\f[R]
1748 \f[B]2\f[R], and \f[B]p\f[R] is not \f[B]0\f[R], then calling this
1754 as inclusive bounds to enerate a pseudo\-random integer.
1800 and calculates and returns the result of \f[B]a\f[R] bit\-shifted left
1811 bit\-shifted right by \f[B]b\f[R] places.
1839 though it has \f[B]16\f[R] binary digits (\f[B]2\f[R] unsigned bytes).
1875 though it has the same number of 8\-bit bytes as the truncated absolute
1894 though it has 16 binary digits (\f[B]2\f[R] unsigned bytes).
1930 \f[B]x\f[R], as though it has the same number of unsigned 8\-bit bytes
1933 \f[B]2\f[R] to the power of the number of binary digits in \f[B]n\f[R]
1934 8\-bit bytes.
1945 value of \f[B]p\f[R] modded by \f[B]2\f[R] to the power of \f[B]8\f[R].
1954 \f[B]x\f[R], as though it has \f[B]16\f[R] binary digits (\f[B]2\f[R]
1956 value of \f[B]p\f[R] modded by \f[B]2\f[R] to the power of \f[B]16\f[R].
1967 value of \f[B]p\f[R] modded by \f[B]2\f[R] to the power of \f[B]32\f[R].
1978 value of \f[B]p\f[R] modded by \f[B]2\f[R] to the power of \f[B]64\f[R].
1988 unsigned 8\-bit bytes, by the number of places equal to the truncated
1989 absolute value of \f[B]p\f[R] modded by 2 to the power of the number of
1990 binary digits in the minimum number of 8\-bit bytes.
1999 \f[B]x\f[R], as though it has the same number of unsigned 8\-bit bytes
2002 \f[B]2\f[R] to the power of the number of binary digits in \f[B]n\f[R]
2003 8\-bit bytes.
2014 value of \f[B]p\f[R] modded by \f[B]2\f[R] to the power of \f[B]8\f[R].
2023 \f[B]x\f[R], as though it has \f[B]16\f[R] binary digits (\f[B]2\f[R]
2025 value of \f[B]p\f[R] modded by \f[B]2\f[R] to the power of \f[B]16\f[R].
2034 \f[B]x\f[R], as though it has \f[B]32\f[R] binary digits (\f[B]2\f[R]
2036 value of \f[B]p\f[R] modded by \f[B]2\f[R] to the power of \f[B]32\f[R].
2045 \f[B]x\f[R], as though it has \f[B]64\f[R] binary digits (\f[B]2\f[R]
2047 value of \f[B]p\f[R] modded by \f[B]2\f[R] to the power of \f[B]64\f[R].
2057 unsigned 8\-bit bytes, by the number of places equal to the truncated
2058 absolute value of \f[B]p\f[R] modded by 2 to the power of the number of
2059 binary digits in the minimum number of 8\-bit bytes.
2068 \f[B]2\f[R] to the power of the multiplication of the truncated absolute
2078 \f[B]2\f[R] to the power of \f[B]8\f[R].
2087 \f[B]2\f[R] to the power of \f[B]16\f[R].
2096 \f[B]2\f[R] to the power of \f[B]32\f[R].
2105 \f[B]2\f[R] to the power of \f[B]64\f[R].
2113 Assumes \f[B]t\f[R] is a bitwise\-reversed number with an extra set bit
2125 \f[B]\-1\f[R] and less than \f[B]1\f[R], it is printed with a leading
2126 zero, regardless of the use of the \f[B]\-z\f[R] option (see the
2135 \f[B]\-1\f[R] and less than \f[B]1\f[R], it is printed with a leading
2136 zero, regardless of the use of the \f[B]\-z\f[R] option (see the
2145 \f[B]\-1\f[R] and less than \f[B]1\f[R], it is printed without a leading
2146 zero, regardless of the use of the \f[B]\-z\f[R] option (see the
2155 \f[B]\-1\f[R] and less than \f[B]1\f[R], it is printed without a leading
2156 zero, regardless of the use of the \f[B]\-z\f[R] option (see the
2168 Returns the numbers of signed, two\[cq]s\-complement integer bytes
2172 Returns \f[B]x\f[R] if it is non\-negative.
2174 be as a 2\[cq]s\-complement signed integer and returns the non\-negative
2178 Returns \f[B]x\f[R] if it is non\-negative.
2180 be as a 2\[cq]s\-complement signed integer with \f[B]n\f[R] bytes and
2181 returns the non\-negative integer that would have the same
2183 If \f[B]x\f[R] cannot fit into \f[B]n\f[R] 2\[cq]s\-complement signed
2187 Outputs the hexadecimal (base \f[B]16\f[R]) representation of
2196 Outputs the binary (base \f[B]2\f[R]) representation of \f[B]x\f[R].
2204 Outputs the base \f[B]b\f[R] representation of \f[B]x\f[R].
2212 Outputs the representation, in binary and hexadecimal, of \f[B]x\f[R] as
2214 Both outputs are split into bytes separated by spaces.
2226 Outputs the representation, in binary and hexadecimal, of \f[B]x\f[R] as
2227 a signed, two\[cq]s\-complement integer in as few power of two bytes as
2229 Both outputs are split into bytes separated by spaces.
2240 Outputs the representation, in binary and hexadecimal, of \f[B]x\f[R] as
2242 Both outputs are split into bytes separated by spaces.
2254 Outputs the representation, in binary and hexadecimal, of \f[B]x\f[R] as
2255 a signed, two\[cq]s\-complement integer in \f[B]n\f[R] bytes.
2256 Both outputs are split into bytes separated by spaces.
2268 Outputs the representation, in binary and hexadecimal, of \f[B]x\f[R] as
2270 Both outputs are split into bytes separated by spaces.
2282 Outputs the representation, in binary and hexadecimal, of \f[B]x\f[R] as
2283 a signed, two\[cq]s\-complement integer in \f[B]1\f[R] byte.
2284 Both outputs are split into bytes separated by spaces.
2296 Outputs the representation, in binary and hexadecimal, of \f[B]x\f[R] as
2297 an unsigned integer in \f[B]2\f[R] bytes.
2298 Both outputs are split into bytes separated by spaces.
2302 \f[B]2\f[R] bytes, an error message is printed instead, but bc(1) is not
2310 Outputs the representation, in binary and hexadecimal, of \f[B]x\f[R] as
2311 a signed, two\[cq]s\-complement integer in \f[B]2\f[R] bytes.
2312 Both outputs are split into bytes separated by spaces.
2315 If \f[B]x\f[R] is not an integer or cannot fit into \f[B]2\f[R] bytes,
2324 Outputs the representation, in binary and hexadecimal, of \f[B]x\f[R] as
2326 Both outputs are split into bytes separated by spaces.
2338 Outputs the representation, in binary and hexadecimal, of \f[B]x\f[R] as
2339 a signed, two\[cq]s\-complement integer in \f[B]4\f[R] bytes.
2340 Both outputs are split into bytes separated by spaces.
2352 Outputs the representation, in binary and hexadecimal, of \f[B]x\f[R] as
2354 Both outputs are split into bytes separated by spaces.
2366 Outputs the representation, in binary and hexadecimal, of \f[B]x\f[R] as
2367 a signed, two\[cq]s\-complement integer in \f[B]8\f[R] bytes.
2368 Both outputs are split into bytes separated by spaces.
2380 Outputs the representation of the truncated absolute value of
2383 Not all of the value will be output if \f[B]n\f[R] is too small.
2391 Outputs the representation of the truncated absolute value of
2393 Not all of the value will be output if \f[B]n\f[R] is too small.
2401 Outputs the representation of the truncated absolute value of
2404 Not all of the value will be output if \f[B]n\f[R] is too small.
2412 Outputs byte \f[B]i\f[R] of the truncated absolute value of \f[B]x\f[R],
2414 \- 1\f[R] is the most significant byte.
2435 .IP \[bu] 2
2437 .IP \[bu] 2
2439 .IP \[bu] 2
2441 .IP \[bu] 2
2443 .IP \[bu] 2
2445 .IP \[bu] 2
2449 .IP \[bu] 2
2451 .IP \[bu] 2
2453 .IP \[bu] 2
2455 .IP \[bu] 2
2457 .IP \[bu] 2
2459 .IP \[bu] 2
2461 .IP \[bu] 2
2463 .IP \[bu] 2
2465 .IP \[bu] 2
2467 .IP \[bu] 2
2469 .IP \[bu] 2
2471 .IP \[bu] 2
2473 .IP \[bu] 2
2476 When bc(1) encounters an error or a signal that it has a non\-default
2484 (after all functions returned) is skipped.
2547 Set at \f[B]SIZE_MAX\-1\f[R].
2551 Set at \f[B]BC_OVERFLOW_MAX\-1\f[R].
2555 Set at \f[B]BC_OVERFLOW_MAX\-1\f[R].
2559 Set at \f[B]BC_OVERFLOW_MAX\-1\f[R].
2564 Set at \f[B]BC_OVERFLOW_MAX\-1\f[R].
2569 Set at \f[B]2\[ha]BC_LONG_BIT\-1\f[R].
2577 Set at \f[B]SIZE_MAX\-1\f[R].
2581 These limits are meant to be effectively non\-existent; the limits are
2582 so large (at least on 64\-bit machines) that there should not be any
2586 As \f[B]non\-portable extensions\f[R], bc(1) recognizes the following
2591 the \f[B]\-s\f[R] option was given.
2594 This is another way to give command\-line arguments to bc(1).
2595 They should be in the same format as all other command\-line arguments.
2598 on the command\-line.
2619 parsing, though such files are still supported on the command\-line
2626 (\f[B]2\[ha]16\-1\f[R]), bc(1) will output lines to that length,
2638 non\-zero value activates the copyright banner when bc(1) is in
2647 with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
2657 variable exists and contains an integer, a non\-zero value makes bc(1)
2663 with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
2672 exists and contains an integer, then a non\-zero value makes bc(1) use
2676 with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
2685 exists and contains an integer, a non\-zero value makes bc(1) use a
2686 prompt, and zero or a non\-integer makes bc(1) not use a prompt.
2693 \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
2697 If any expressions or expression files are given on the command\-line
2698 with \f[B]\-e\f[R], \f[B]\-\-expression\f[R], \f[B]\-f\f[R], or
2699 \f[B]\-\-file\f[R], then if this environment variable exists and
2700 contains an integer, a non\-zero value makes bc(1) exit after executing
2706 with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
2711 contains an integer, a non\-zero value makes bc(1) clamp digits that are
2712 greater than or equal to the current \f[B]ibase\f[R] so that all such
2718 This never applies to single\-digit numbers, as per the standard (see
2722 with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
2738 pseudo\-random number generator, attempting to convert a negative number
2741 to use a non\-integer where an integer is required.
2749 \f[B]2\f[R]
2763 when the option \f[B]\-s\f[R] or any equivalents were given.
2786 directory as a file, and giving invalid command\-line options.
2797 \f[B]\-i\f[R] flag or \f[B]\-\-interactive\f[R] option.
2801 \f[B]\-i\f[R] flag or \f[B]\-\-interactive\f[R] option.
2804 interactive mode and a non\-interactive mode.
2806 and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]\-i\f[R]
2807 flag and \f[B]\-\-interactive\f[R] option can turn it on in other
2817 If \f[B]stdin\f[R], \f[B]stdout\f[R], and \f[B]stderr\f[R] are all
2824 that environment variable contains a non\-zero integer, bc(1) will turn
2826 are all connected to a TTY.
2828 \f[I]not\f[R] a non\-zero integer, then bc(1) will not turn TTY mode on.
2832 The default setting can be queried with the \f[B]\-h\f[R] or
2833 \f[B]\-\-help\f[R] options.
2846 non\-zero integer, then the prompt is turned on when \f[B]stdin\f[R],
2848 \f[B]\-P\f[R] and \f[B]\-\-no\-prompt\f[R] options were not used.
2850 the \f[B]\-R\f[R] and \f[B]\-\-no\-read\-prompt\f[R] options must also
2855 the \f[B]\-P\f[R] and \f[B]\-\-no\-prompt\f[R] options, and the
2856 \f[B]\-R\f[R] and \f[B]\-\-no\-read\-prompt\f[R] options.
2868 \f[B]BC_SIGINT_RESET\f[R] or its default is an integer and non\-zero,
2889 exit, and it uses the default handler for all other signals.
2896 bc(1) is compliant with the IEEE Std 1003.1\-2017
2897 (\[lq]POSIX.1\-2017\[rq]) specification at
2899 The flags \f[B]\-efghiqsvVw\f[R], all long options, and the extensions
2903 interpretation of that specification that is different from all known