Home > Article > Operation and Maintenance > What is the full name of bc in linux?
The full name of bc in Linux is "Binary Calculator". bc is an interpreter provided by the arbitrary precision arithmetic language, used to implement arbitrary precision calculations; the bc command first reads any input file specified by the File parameter, Then read the standard input, and its input file must be a text file containing command sequences, statements, or function definitions that the bc command can read and execute.
#The operating environment of this tutorial: linux5.9.8 system, Dell G3 computer.
What is the full name of bc in linux?
bc provides an interpreter for the arbitrary-precision arithmetic language. The meaning of BC is: Binary Calculator, used to implement arbitrary precision calculations (often high-precision calculations).
LINUX bc command
Syntax
bc [ -c ] [ -l ] [ File ... ]
Description
The bc command is an interactive process that provides arbitrary precision arithmetic. The bc command first reads any input file specified by the File parameter, and then reads standard input. The input file must be a text file containing command sequences, statements, or function definitions that the bc command can read and execute.
The bc command is the preprocessor of the dc command. It automatically calls the dc command unless the -c (compile only) flag is specified. If the -c flag is specified, output from the bc command goes to standard output.
The bc command allows you to specify the input and output bases for decimal, octal, or hexadecimal operations. The default value is decimal. This command also provides scaling provisions for decimal point notation. The bc command always uses . (dot) to represent a radix point, regardless of any decimal point characters specified as part of the current locale.
The syntax of the bc command is similar to the syntax of the C language. You can use the bc command to convert between bases by specifying the ibase keyword for the input base and the obase keyword for the output base. The range 2 to 16 is valid for the ibase keyword. The obase keyword ranges from 2 up to the limit set by the BC_BASE_MAX value defined in the /usr/include/sys/limits.h file. Regardless of the ibase and obase settings, the bc command recognizes the letters A through F as their hexadecimal values 10 through 15.
The output of the bc command is controlled by the reader. The output consists of one or more lines containing the values of all unassigned expressions that were executed. The base and precision of the output are controlled by the values of the obase and scale keywords.
Recommended learning: "linux video tutorial"
The above is the detailed content of What is the full name of bc in linux?. For more information, please follow other related articles on the PHP Chinese website!