Lines Matching +full:dc +full:- +full:to +full:- +full:dc
1 <!---
3 SPDX-License-Identifier: BSD-2-Clause
5 Copyright (c) 2018-2024 Gavin D. Howard and contributors.
18 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29 -->
33 dc - arbitrary-precision decimal reverse-Polish notation calculator
37 …dc** [**-cChiPRvVx**] [**-\-version**] [**-\-help**] [**-\-digit-clamp**] [**-\-no-digit-clamp**] …
41 dc(1) is an arbitrary-precision calculator. It uses a stack (reverse Polish
42 notation) to store numbers and results of computations. Arithmetic operations
45 If no files are given on the command-line, then dc(1) reads from **stdin** (see
46 the **STDIN** section). Otherwise, those files are processed, and dc(1) will
49 If a user wants to set up a standard environment, they can use **DC_ENV_ARGS**
51 **scale** always set to **10**, they can set **DC_ENV_ARGS** to **-e 10k**, and
52 this dc(1) will always start with a **scale** of **10**.
56 The following are the options that dc(1) accepts.
58 **-C**, **-\-no-digit-clamp**
60 : Disables clamping of digits greater than or equal to the current **ibase**
63 This means that the value added to a number from a digit is always that
64 digit's value multiplied by the value of ibase raised to the power of the
67 If this and/or the **-c** or **-\-digit-clamp** options are given multiple
72 with the **-h** or **-\-help** options.
74 This is a **non-portable extension**.
76 **-c**, **-\-digit-clamp**
78 : Enables clamping of digits greater than or equal to the current **ibase**
81 This means that digits that the value added to a number from a digit that is
82 greater than or equal to the ibase is the value of ibase minus 1 all
83 multiplied by the value of ibase raised to the power of the digit's
86 If this and/or the **-C** or **-\-no-digit-clamp** options are given
91 with the **-h** or **-\-help** options.
93 This is a **non-portable extension**.
95 **-E** *seed*, **-\-seed**=*seed*
97 : Sets the builtin variable **seed** to the value *seed* assuming that *seed*
102 This is a **non-portable extension**.
104 **-e** *expr*, **-\-expression**=*expr*
111 If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**,
113 expressions and files, dc(1) will exit, unless **-** (**stdin**) was given
114 as an argument at least once to **-f** or **-\-file**, whether on the
115 command-line or in **DC_ENV_ARGS**. However, if any other **-e**,
116 **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-**
117 or equivalent is given, dc(1) will give a fatal error and exit.
119 This is a **non-portable extension**.
121 **-f** *file*, **-\-file**=*file*
127 If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**,
129 expressions and files, dc(1) will exit, unless **-** (**stdin**) was given
130 as an argument at least once to **-f** or **-\-file**. However, if any other
131 **-e**, **-\-expression**, **-f**, or **-\-file** arguments are given after
132 **-f-** or equivalent is given, dc(1) will give a fatal error and exit.
134 This is a **non-portable extension**.
136 **-h**, **-\-help**
140 **-I** *ibase*, **-\-ibase**=*ibase*
142 : Sets the builtin variable **ibase** to the value *ibase* assuming that
147 This is a **non-portable extension**.
149 **-i**, **-\-interactive**
153 This is a **non-portable extension**.
155 **-L**, **-\-no-line-length**
158 newlines. In other words, this option sets **BC_LINE_LENGTH** to **0** (see
161 This is a **non-portable extension**.
163 **-O** *obase*, **-\-obase**=*obase*
165 : Sets the builtin variable **obase** to the value *obase* assuming that
170 This is a **non-portable extension**.
172 **-P**, **-\-no-prompt**
176 want a prompt or are not used to having them in dc(1). Most of those users
177 would want to put this option in **DC_ENV_ARGS**.
182 This is a **non-portable extension**.
184 **-R**, **-\-no-read-prompt**
188 do not want a read prompt or are not used to having them in dc(1). Most of
189 those users would want to put this option in **BC_ENV_ARGS** (see the
191 lines of dc(1) scripts that prompt for user input.
200 This is a **non-portable extension**.
202 **-S** *scale*, **-\-scale**=*scale*
204 : Sets the builtin variable **scale** to the value *scale* assuming that
209 This is a **non-portable extension**.
211 **-v**, **-V**, **-\-version**
215 **-x** **-\-extended-register**
220 This is a **non-portable extension**.
222 **-z**, **-\-leading-zeroes**
224 : Makes dc(1) print all numbers greater than **-1** and less than **1**, and
225 not equal to **0**, with a leading zero.
227 This is a **non-portable extension**.
229 All long options are **non-portable extensions**.
233 If no files are given on the command-line and no files or expressions are given
234 by the **-f**, **-\-file**, **-e**, or **-\-expression** options, then dc(1)
237 However, there is a caveat to this.
239 First, **stdin** is evaluated a line at a time. The only exception to this is if
241 brackets, all brackets must be balanced before dc(1) parses and executes.
245 Any non-error output is written to **stdout**. In addition, if history (see the
247 both are output to **stdout**.
249 **Note**: Unlike other dc(1) implementations, this dc(1) will issue a fatal
250 error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if
251 **stdout** is closed, as in **dc <file> >&-**, it will quit with an error. This
252 is done so that dc(1) can report problems when **stdout** is redirected to a
255 If there are scripts that depend on the behavior of other dc(1) implementations,
256 it is recommended that those scripts be changed to redirect **stdout** to
261 Any error output is written to **stderr**.
263 **Note**: Unlike other dc(1) implementations, this dc(1) will issue a fatal
264 error (see the **EXIT STATUS** section) if it cannot write to **stderr**, so if
265 **stderr** is closed, as in **dc <file> 2>&-**, it will quit with an error. This
266 is done so that dc(1) can exit with an error code when **stderr** is redirected
267 to a file.
269 If there are scripts that depend on the behavior of other dc(1) implementations,
270 it is recommended that those scripts be changed to redirect **stderr** to
279 **ibase** is a register (see the **REGISTERS** section) that determines how to
283 The max allowable value for **ibase** can be queried in dc(1) programs with the
286 **obase** is a register (see the **REGISTERS** section) that determines how to
294 Outputting in scientific and engineering notations are **non-portable
301 allowable value for **scale** can be queried in dc(1) programs with the **V**
304 **seed** is a register containing the current seed for the pseudo-random number
306 assigned to **seed** later, the pseudo-random number generator is guaranteed to
307 produce the same sequence of pseudo-random numbers that were generated after the
310 Multiple values assigned to **seed** can produce the same sequence of
311 pseudo-random numbers. Likewise, when a value is assigned to **seed**, it is not
313 In addition, the value of **seed** will change after any call to the **'**
318 **Note**: The values returned by the pseudo-random number generator with the
319 **'** and **"** commands are guaranteed to **NOT** be cryptographically secure.
320 This is a consequence of using a seeded pseudo-random number generator. However,
321 they *are* guaranteed to be reproducible with identical **seed** values. This
322 means that the pseudo-random values from dc(1) should only be used where a
323 reproducible stream of pseudo-random numbers is *ESSENTIAL*. In any other case,
324 use a non-seeded pseudo-random number generator.
326 The pseudo-random number generator, **seed**, and all associated operations are
327 **non-portable extensions**.
332 **non-portable extension**.
336 Numbers are strings made up of digits, uppercase letters up to **F**, and at
337 most **1** period for a radix. Numbers can have up to **DC_NUM_MAX** digits.
338 Uppercase letters are equal to **9** plus their position in the alphabet (i.e.,
342 they are greater than or equal to the current value of **ibase**), then the
343 behavior depends on the existence of the **-c**/**-\-digit-clamp** or
344 **-C**/**-\-no-digit-clamp** options (see the **OPTIONS** section), the
347 the **-h**/**-\-help** option.
349 If clamping is off, then digits or letters that are greater than or equal to the
352 means that, with an **ibase** of **3**, the number **AB** is equal to
355 If clamping is on, then digits or letters that are greater than or equal to the
356 current value of **ibase** are set to the value of the highest valid digit in
359 **AB** is equal to **3\^1\*2+3\^0\*2**, which is **3** times **2** plus **2**,
362 There is one exception to clamping: single-character numbers (i.e., **A**
366 mandated by the standard for bc(1) (see the STANDARDS section) and is meant to
367 provide an easy way to set the current **ibase** (with the **i** command)
373 In addition, dc(1) accepts numbers in scientific notation. These have the form
375 an integer. An example is **1.89237e9**, which is equal to **1892370000**.
376 Negative exponents are also allowed, so **4.2890e_3** is equal to **0.0042890**.
379 interpreted according to the current **ibase**, but the number is still
381 if **ibase** is **16** and dc(1) is given the number string **FFeA**, the
382 resulting decimal number will be **2550000000000**, and if dc(1) is given the
385 Accepting input as scientific notation is a **non-portable extension**.
396 printing numbers. Scientific notation is activated by assigning **0** to
398 to **obase** using **1o**. To deactivate them, just assign a different value to
402 **non-portable extension**.
422 interpreted as an 8-bit ASCII character, making it a byte stream.
426 This is a **non-portable extension**.
430 : Prints the entire contents of the stack, in order from newest to oldest,
442 onto the stack. The *scale* of the result is equal to the max *scale* of
445 **-**
448 pushed onto the stack. The *scale* of the result is equal to the max
456 is equal to **min(a+b,max(scale,a,b))** where **min()** and **max()** return
462 pushed onto the stack. The *scale* of the result is equal to **scale**.
464 The first value popped off of the stack must be non-zero.
471 Remaindering is equivalent to 1) Computing **a/b** to current **scale**, and
472 2) Using the result of step 1 to calculate **a-(a/b)\*b** to *scale*
475 The first value popped off of the stack must be non-zero.
481 This is equivalent to **x y / x y %** except that **x** and **y** are only
484 The first value popped off of the stack must be non-zero.
486 This is a **non-portable extension**.
490 : The top two values are popped off the stack, the second is raised to the
492 the result is equal to **scale**.
496 non-zero.
501 result is pushed onto the stack. The *scale* of the result is equal to
504 The value popped off of the stack must be non-negative.
513 **non-portable extension**.
520 This is a **non-portable extension**.
528 integer and non-zero. The second value popped is used as the exponent and
529 must be an integer and non-negative. The third value popped is the base and
532 This is a **non-portable extension**.
539 This is a **non-portable extension**.
544 is set to the value of the first, whether by truncation or extension.
546 The first value popped off of the stack must be an integer and non-negative.
548 This is a **non-portable extension**.
553 (radix shifted right) to the value of the first.
555 The first value popped off of the stack must be an integer and non-negative.
557 This is a **non-portable extension**.
562 (radix shifted left) to the value of the first.
564 The first value popped off of the stack must be an integer and non-negative.
566 This is a **non-portable extension**.
573 This is a **non-portable extension**.
580 This is a **non-portable extension**.
587 This is a **non-portable extension**.
592 **1** is pushed if the first is less than or equal to the second, or **0**
595 This is a **non-portable extension**.
602 This is a **non-portable extension**.
607 **1** is pushed if the first is greater than or equal to the second, or
610 This is a **non-portable extension**.
614 : The top two values are popped off of the stack. If they are both non-zero, a
618 This is like the **&&** operator in bc(1), and it is *not* a short-circuit
621 This is a **non-portable extension**.
626 non-zero, a **1** is pushed onto the stack. If both of them are zero, then a
629 This is like the **||** operator in bc(1), and it is *not* a short-circuit
632 This is a **non-portable extension**.
634 ## Pseudo-Random Number Generator
636 dc(1) has a built-in pseudo-random number generator. These commands query the
637 pseudo-random number generator. (See Parameters for more information about the
638 **seed** value that controls the pseudo-random number generator.)
640 The pseudo-random number generator is guaranteed to **NOT** be
648 The generated integer is made as unbiased as possible, subject to the
649 limitations of the pseudo-random number generator.
651 This is a **non-portable extension**.
657 non-integer, an error is raised, and dc(1) resets (see the **RESET**
660 pseudo-random integers, multiplying them by appropriate powers of
666 The generated integer is made as unbiased as possible, subject to the
667 limitations of the pseudo-random number generator.
669 This is a **non-portable extension**.
723 : Pops the value off of the top of the stack and uses it to set **ibase**,
730 : Pops the value off of the top of the stack and uses it to set **obase**,
738 : Pops the value off of the top of the stack and uses it to set **scale**,
739 which must be non-negative.
745 : Pops the value off of the top of the stack and uses it to set **seed**. The
746 meaning of **seed** is dependent on the current pseudo-random number
747 generator but is guaranteed to not change except for new major versions.
751 If a previously used **seed** value is used again, the pseudo-random number
752 generator is guaranteed to produce the same sequence of pseudo-random
755 The exact value assigned to **seed** is not guaranteed to be returned if the
757 both values, when assigned to **seed**, are guaranteed to produce the same
758 sequence of pseudo-random numbers. This means that certain values assigned
759 to **seed** will not produce unique sequences of pseudo-random numbers.
761 There is no limit to the length (number of significant decimal digits) or
762 *scale* of the value that can be assigned to **seed**.
764 This is a **non-portable extension**.
782 This is a **non-portable extension**.
788 This is a **non-portable extension**.
794 This is a **non-portable extension**.
800 This is a **non-portable extension**.
805 pseudo-random number generator command.
807 This is a **non-portable extension**.
813 dc(1) can work with both numbers and strings, and registers (see the
814 **REGISTERS** section) can hold both strings and numbers. dc(1) always knows
817 While arithmetic operations have to have numbers, and will print an error if
842 string; otherwise, push a one-character string where the character is the
847 the original string is used to create the new string as a one-character
850 This is a **non-portable extension**.
872 If either or both of the values are not numbers, dc(1) will raise an error
879 If either or both of the values are not numbers, dc(1) will raise an error
882 This is a **non-portable extension**.
887 the first value is not greater than the second (less than or equal to), then
890 If either or both of the values are not numbers, dc(1) will raise an error
897 If either or both of the values are not numbers, dc(1) will raise an error
900 This is a **non-portable extension**.
908 If either or both of the values are not numbers, dc(1) will raise an error
915 If either or both of the values are not numbers, dc(1) will raise an error
918 This is a **non-portable extension**.
923 the first value is not less than the second (greater than or equal to), then
926 If either or both of the values are not numbers, dc(1) will raise an error
933 If either or both of the values are not numbers, dc(1) will raise an error
936 This is a **non-portable extension**.
941 the first value is equal to the second, then the contents of register *r*
944 If either or both of the values are not numbers, dc(1) will raise an error
951 If either or both of the values are not numbers, dc(1) will raise an error
954 This is a **non-portable extension**.
959 the first value is not equal to the second, then the contents of register
962 If either or both of the values are not numbers, dc(1) will raise an error
969 If either or both of the values are not numbers, dc(1) will raise an error
972 This is a **non-portable extension**.
976 : Reads a line from the **stdin** and executes it. This is to allow macros to
983 macro executing, dc(1) exits.
987 : Pops a value from the stack which must be non-negative and is used the
988 number of macro executions to pop off of the execution stack. If the number
989 of levels to pop is greater than the number of executing macros, dc(1)
996 is exactly as many as is needed to make dc(1) exit with the **Q** command,
997 so the sequence **,Q** will make dc(1) exit.
999 This is a **non-portable extension**.
1028 This is a **non-portable extension**.
1035 This is a **non-portable extension**.
1047 item) when dc(1) starts, dc(1) requires that each register's stack must
1048 always have at least one item; dc(1) will give an error and reset otherwise
1052 This is a **non-portable extension**.
1072 This is a **non-portable extension**.
1095 with the **-z** or **-\-leading-zeroes** options (see the **OPTIONS**
1096 section), non-zero otherwise.
1105 (**0**) in their stack, and it is a runtime error to attempt to pop that item
1108 In non-extended register mode, a register name is just the single character that
1111 newline or a left bracket to be used as a register name.
1115 Unlike most other dc(1) implentations, this dc(1) provides nearly unlimited
1118 If extended register mode is enabled (**-x** or **-\-extended-register**
1119 command-line arguments are given), then normal single character registers are
1121 register name is a space (according to **isspace()**) and not a newline
1124 In that case, the register name is found according to the regex
1125 **\[a-z\]\[a-z0-9\_\]\*** (like bc(1) identifiers), and it is a parse error if
1126 the next non-space characters do not match that regex.
1130 When dc(1) encounters an error or a signal that it has a non-default handler
1135 Then the execution point is set so that any code waiting to execute (after all
1141 Thus, when dc(1) resets, it skips any remaining code waiting to be executed.
1148 Most dc(1) implementations use **char** types to calculate the value of **1**
1149 decimal digit at a time, but that can be slow. This dc(1) does something
1152 It uses large integers to calculate more than **1** decimal digit at a time. If
1159 In addition, this dc(1) uses an even larger integer for overflow checking. This
1161 twice as large as the integer type used to store digits.
1165 The following are the limits on dc(1):
1169 : The number of bits in the **long** type in the environment where dc(1) was
1194 : The maximum size of arrays. Set at **SIZE_MAX-1**.
1198 : The maximum **scale**. Set at **DC_OVERFLOW_MAX-1**.
1202 : The maximum length of strings. Set at **DC_OVERFLOW_MAX-1**.
1206 : The maximum length of identifiers. Set at **DC_OVERFLOW_MAX-1**.
1211 after the decimal point. Set at **DC_OVERFLOW_MAX-1**.
1215 : The maximum integer (inclusive) returned by the **'** command, if dc(1). Set
1216 at **2\^DC_LONG_BIT-1**.
1225 : The maximum number of vars/arrays. Set at **SIZE_MAX-1**.
1227 These limits are meant to be effectively non-existent; the limits are so large
1228 (at least on 64-bit machines) that there should not be any point at which they
1234 As **non-portable extensions**, dc(1) recognizes the following environment
1239 : This is another way to give command-line arguments to dc(1). They should be
1240 in the same format as all other command-line arguments. These are always
1242 before arguments and files given on the command-line. This gives the user
1243 the ability to set up "standard" options and files to be used at every
1244 invocation. The most useful thing for such files to contain would be useful
1245 functions that the user might want every time dc(1) runs. Another use would
1246 be to use the **-e** option to set **scale** to a value other than **0**.
1250 **"/home/gavin/some dc file.dc"** will be correctly parsed, but the string
1251 **"/home/gavin/some \"dc\" file.dc"** will include the backslashes.
1255 double quotes as the outside quotes, as in **"some 'dc' file.dc"**, and vice
1257 both kinds of quotes in **DC_ENV_ARGS** is not supported due to the
1259 command-line where the parsing is done by the shell.
1264 than **1** and is less than **UINT16_MAX** (**2\^16-1**), dc(1) will output
1265 lines to that length, including the backslash newline combo. The default
1269 numbers without regard to line length and without backslashes and newlines.
1273 : If dc(1) is not in interactive mode (see the **INTERACTIVE MODE** section),
1274 then this environment variable has no effect because dc(1) exits on
1277 However, when dc(1) is in interactive mode, then if this environment
1278 variable exists and contains an integer, a non-zero value makes dc(1) reset
1279 on **SIGINT**, rather than exit, and zero makes dc(1) exit. If this
1280 environment variable exists and is *not* an integer, then dc(1) will exit on
1284 the **-h** or **-\-help** options.
1292 exists and contains an integer, then a non-zero value makes dc(1) use TTY
1293 mode, and zero makes dc(1) not use TTY mode.
1296 the **-h** or **-\-help** options.
1304 exists and contains an integer, a non-zero value makes dc(1) use a prompt,
1305 and zero or a non-integer makes dc(1) not use a prompt. If this environment
1310 override the default, which can be queried with the **-h** or **-\-help**
1315 : If any expressions or expression files are given on the command-line with
1316 **-e**, **-\-expression**, **-f**, or **-\-file**, then if this environment
1317 variable exists and contains an integer, a non-zero value makes dc(1) exit
1319 dc(1) not exit.
1322 the **-h** or **-\-help** options.
1327 integer, a non-zero value makes dc(1) clamp digits that are greater than or
1328 equal to the current **ibase** so that all such digits are considered equal
1329 to the **ibase** minus 1, and a zero value disables such clamping so that
1330 those digits are always equal to their value, which is multiplied by the
1333 This never applies to single-digit numbers, as per the bc(1) standard (see
1337 the **-h** or **-\-help** options.
1341 dc(1) returns the following exit statuses:
1354 number, using a negative number as a bound for the pseudo-random number
1355 generator, attempting to convert a negative number to a hardware integer,
1356 overflow when converting a number to a hardware integer, overflow when
1357 calculating the size of a number, and attempting to use a non-integer where
1360 Converting to a hardware integer happens for the second operand of the power
1369 to find the end of a string or comment, and using a token where it is
1376 Runtime errors include assigning an invalid number to any global (**ibase**,
1377 **obase**, or **scale**), giving a bad expression to a **read()** call,
1379 attempting to execute a number), and attempting an operation when the stack
1386 Fatal errors include memory allocation errors, I/O errors, failing to open
1387 files, attempting to use files that do not have only ASCII characters (dc(1)
1388 only accepts ASCII characters), attempting to open a directory as a file,
1389 and giving invalid command-line options.
1391 The exit status **4** is special; when a fatal error occurs, dc(1) always exits
1392 and returns **4**, no matter what mode dc(1) is in.
1394 The other statuses will only be returned when dc(1) is not in interactive mode
1395 (see the **INTERACTIVE MODE** section), since dc(1) resets its state (see the
1398 **-i** flag or **-\-interactive** option.
1400 These exit statuses allow dc(1) to be used in shell scripting with error
1401 checking, and its normal behavior can be forced by using the **-i** flag or
1402 **-\-interactive** option.
1406 Like bc(1), dc(1) has an interactive mode and a non-interactive mode.
1408 are hooked to a terminal, but the **-i** flag and **-\-interactive** option can
1411 In interactive mode, dc(1) attempts to recover from errors (see the **RESET**
1413 done for the current input. dc(1) may also reset on **SIGINT** instead of exit,
1419 If **stdin**, **stdout**, and **stderr** are all connected to a TTY, then "TTY
1420 mode" is considered to be available, and thus, dc(1) can turn on TTY mode,
1421 subject to some settings.
1425 non-zero integer, dc(1) will turn on TTY mode when **stdin**, **stdout**, and
1426 **stderr** are all connected to a TTY. If the **DC_TTY_MODE** environment
1427 variable exists but is *not* a non-zero integer, then dc(1) will not turn TTY
1431 setting is used. The default setting can be queried with the **-h** or
1432 **-\-help** options.
1436 requires only **stdin** and **stdout** to be connected to a terminal.
1438 ## Command-Line History
1440 Command-line history is only enabled if TTY mode is, i.e., that **stdin**,
1441 **stdout**, and **stderr** are connected to a TTY and the **DC_TTY_MODE**
1452 If the environment variable **DC_PROMPT** exists and is a non-zero integer, then
1454 to a TTY and the **-P** and **-\-no-prompt** options were not used. The read
1455 prompt will be turned on under the same conditions, except that the **-R** and
1456 **-\-no-read-prompt** options must also not be used.
1459 with the **DC_TTY_MODE** environment variable, the **-P** and **-\-no-prompt**
1460 options, and the **-R** and **-\-no-read-prompt** options. See the **ENVIRONMENT
1465 Sending a **SIGINT** will cause dc(1) to do one of two things.
1467 If dc(1) is not in interactive mode (see the **INTERACTIVE MODE** section), or
1469 section), or its default, is either not an integer or it is zero, dc(1) will
1472 However, if dc(1) is in interactive mode, and the **DC_SIGINT_RESET** or its
1473 default is an integer and non-zero, then dc(1) will stop executing the current
1476 Note that "current input" can mean one of two things. If dc(1) is processing
1477 input from **stdin** in interactive mode, it will ask for more input. If dc(1)
1482 This means that if a **SIGINT** is sent to dc(1) as it is executing a file, it
1483 can seem as though dc(1) did not respond to the signal since it will immediately
1485 when interacting with dc(1) have function definitions, which are quick to parse.
1486 If a file takes a long time to execute, there may be a bug in that file. The
1487 rest of the files could still be executed without problem, allowing the user to
1490 **SIGTERM** and **SIGQUIT** cause dc(1) to clean up and exit, and it uses the
1492 case, and only when dc(1) is in TTY mode (see the **TTY MODE** section), a
1493 **SIGHUP** will cause dc(1) to clean up and exit.
1497 dc(1) supports interactive command-line editing.
1499 If dc(1) can be in TTY mode (see the **TTY MODE** section), history can be
1500 enabled. This means that command-line history can only be enabled when
1501 **stdin**, **stdout**, and **stderr** are all connected to a TTY.
1506 **Note**: tabs are converted to 8 spaces.
1510 This dc(1) ships with support for adding error messages for different locales
1519 The dc(1) utility operators and some behavior are compliant with the operators
1520 in the IEEE Std 1003.1-2017 (“POSIX.1-2017”) bc(1) specification at