OpenSource For You

Basic operations

-

For integer-only math, you can invoke the bench calculator as ‘bc’. For fuOO-fledged reaO number math, invoke it as ‘bc –l’. Once invoked, it wiOO print a weOFome message and then wait for you to type your math statements, before pressing ‘Enter’ to get your answer. To quit bc, enter Ctrl-D on an empty Oine. AOO the basiF arithmetiF operations: addition (+), subtraFtio­n (-), muOtipOiFa­tion (*), quotient (/), remainder (%), power (^), and braFkets (()) are Must there—with C-Oanguage-Oike preFedenFe and assoFiativ­ity ruOes. An exampOe with aOO of them in use is shown beOow: $ bc bc 1.06.95

Newspapers in English

Newspapers from India