bc — Binary Calculator

Synopsis

/usr/bin/bc [-c] [-l] [file...] 

Description

bc is both a calculator and a C-like language that you can use to write numerical programs. bc is actually a preprocessor for the dc desktop calculator and uses the dc command to do its work. However, bc contains many more functions than does dc, including named functions, logical operators, and mathematical functions such as sqrt (square root). bc uses an infix notation, where you place operators between the numbers on which they operate. For example, 2 + 2 = 4.

You execute bc from a command line. It can take input from a command line or directly from a file and then from the command. When you use a file name as an argument, bc reads the file, processes its commands, ...

Get Solaris™ 7 Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.