Lines Matching full:dc

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
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
52 this dc(1) will always start with a **scale** of **10**.
56 The following are the options that dc(1) accepts.
104 expressions and files, dc(1) will exit, unless **-** (**stdin**) was given
108 or equivalent is given, dc(1) will give a fatal error and exit.
120 expressions and files, dc(1) will exit, unless **-** (**stdin**) was given
123 **-f-** or equivalent is given, dc(1) will give a fatal error and exit.
167 want a prompt or are not used to having them in dc(1). Most of those users
179 do not want a read prompt or are not used to having them in dc(1). Most of
182 lines of dc(1) scripts that prompt for user input.
215 : Makes dc(1) print all numbers greater than **-1** and less than **1**, and
225 by the **-f**, **-\-file**, **-e**, or **-\-expression** options, then dc(1)
232 brackets, all brackets must be balanced before dc(1) parses and executes.
240 **Note**: Unlike other dc(1) implementations, this dc(1) will issue a fatal
242 **stdout** is closed, as in **dc <file> >&-**, it will quit with an error. This
243 is done so that dc(1) can report problems when **stdout** is redirected to a
246 If there are scripts that depend on the behavior of other dc(1) implementations,
254 **Note**: Unlike other dc(1) implementations, this dc(1) will issue a fatal
256 **stderr** is closed, as in **dc <file> 2>&-**, it will quit with an error. This
257 is done so that dc(1) can exit with an error code when **stderr** is redirected
260 If there are scripts that depend on the behavior of other dc(1) implementations,
274 The max allowable value for **ibase** can be queried in dc(1) programs with the
287 allowable value for **scale** can be queried in dc(1) programs with the **V**
644 dc(1) can work with both numbers and strings, and registers (see the
645 **REGISTERS** section) can hold both strings and numbers. dc(1) always knows
703 If either or both of the values are not numbers, dc(1) will raise an error
710 If either or both of the values are not numbers, dc(1) will raise an error
721 If either or both of the values are not numbers, dc(1) will raise an error
728 If either or both of the values are not numbers, dc(1) will raise an error
739 If either or both of the values are not numbers, dc(1) will raise an error
746 If either or both of the values are not numbers, dc(1) will raise an error
757 If either or both of the values are not numbers, dc(1) will raise an error
764 If either or both of the values are not numbers, dc(1) will raise an error
775 If either or both of the values are not numbers, dc(1) will raise an error
782 If either or both of the values are not numbers, dc(1) will raise an error
793 If either or both of the values are not numbers, dc(1) will raise an error
800 If either or both of the values are not numbers, dc(1) will raise an error
814 macro executing, dc(1) exits.
820 of levels to pop is greater than the number of executing macros, dc(1)
827 is exactly as many as is needed to make dc(1) exit with the **Q** command,
828 so the sequence **,Q** will make dc(1) exit.
878 item) when dc(1) starts, dc(1) requires that each register's stack must
879 always have at least one item; dc(1) will give an error and reset otherwise
946 Unlike most other dc(1) implentations, this dc(1) provides nearly unlimited
961 When dc(1) encounters an error or a signal that it has a non-default handler
972 Thus, when dc(1) resets, it skips any remaining code waiting to be executed.
979 Most dc(1) implementations use **char** types to calculate the value of **1**
980 decimal digit at a time, but that can be slow. This dc(1) does something
990 In addition, this dc(1) uses an even larger integer for overflow checking. This
996 The following are the limits on dc(1):
1000 : The number of bits in the **long** type in the environment where dc(1) was
1060 As **non-portable extensions**, dc(1) recognizes the following environment
1065 : This is another way to give command-line arguments to dc(1). They should be
1071 functions that the user might want every time dc(1) runs. Another use would
1076 **"/home/gavin/some dc file.dc"** will be correctly parsed, but the string
1077 **"/home/gavin/some \"dc\" file.dc"** will include the backslashes.
1081 double quotes as the outside quotes, as in **"some 'dc' file.dc"**, and vice
1090 than **1** and is less than **UINT16_MAX** (**2\^16-1**), dc(1) will output
1099 : If dc(1) is not in interactive mode (see the **INTERACTIVE MODE** section),
1100 then this environment variable has no effect because dc(1) exits on
1103 However, when dc(1) is in interactive mode, then if this environment
1104 variable exists and contains an integer, a non-zero value makes dc(1) reset
1105 on **SIGINT**, rather than exit, and zero makes dc(1) exit. If this
1106 environment variable exists and is *not* an integer, then dc(1) will exit on
1118 exists and contains an integer, then a non-zero value makes dc(1) use TTY
1119 mode, and zero makes dc(1) not use TTY mode.
1130 exists and contains an integer, a non-zero value makes dc(1) use a prompt,
1131 and zero or a non-integer makes dc(1) not use a prompt. If this environment
1143 variable exists and contains an integer, a non-zero value makes dc(1) exit
1145 dc(1) not exit.
1153 integer, a non-zero value makes dc(1) clamp digits that are greater than or
1167 dc(1) returns the following exit statuses:
1211 files, attempting to use files that do not have only ASCII characters (dc(1)
1215 The exit status **4** is special; when a fatal error occurs, dc(1) always exits
1216 and returns **4**, no matter what mode dc(1) is in.
1218 The other statuses will only be returned when dc(1) is not in interactive mode
1219 (see the **INTERACTIVE MODE** section), since dc(1) resets its state (see the
1224 These exit statuses allow dc(1) to be used in shell scripting with error
1230 Like bc(1), dc(1) has an interactive mode and a non-interactive mode.
1235 In interactive mode, dc(1) attempts to recover from errors (see the **RESET**
1237 done for the current input. dc(1) may also reset on **SIGINT** instead of exit,
1244 mode" is considered to be available, and thus, dc(1) can turn on TTY mode,
1249 non-zero integer, dc(1) will turn on TTY mode when **stdin**, **stdout**, and
1251 variable exists but is *not* a non-zero integer, then dc(1) will not turn TTY
1281 Sending a **SIGINT** will cause dc(1) to do one of two things.
1283 If dc(1) is not in interactive mode (see the **INTERACTIVE MODE** section), or
1285 section), or its default, is either not an integer or it is zero, dc(1) will
1288 However, if dc(1) is in interactive mode, and the **DC_SIGINT_RESET** or its
1289 default is an integer and non-zero, then dc(1) will stop executing the current
1292 Note that "current input" can mean one of two things. If dc(1) is processing
1293 input from **stdin** in interactive mode, it will ask for more input. If dc(1)
1298 This means that if a **SIGINT** is sent to dc(1) as it is executing a file, it
1299 can seem as though dc(1) did not respond to the signal since it will immediately
1301 when interacting with dc(1) have function definitions, which are quick to parse.
1306 **SIGTERM** and **SIGQUIT** cause dc(1) to clean up and exit, and it uses the
1315 The dc(1) utility operators and some behavior are compliant with the operators