Linux Today: Linux News On Internet Time.

Floating Point Math in Bash

Jul 30, 2008, 20:30 (1 Talkback[s])
(Other stories by Mitch Frazier)

"By default bc outputs its result with no digits to the right of the decimal point and without a decimal point. To change this you have to change one of bc's builtin variables: scale. This is where the "language" features of bc are relevant, in bc as in C statements are separated by semi-colons."

Complete Story

Related Stories: