Show decimal numbers with bc
scale
defines the number of decimals.
By default, scale
is 0 so no decimals are shown.
If you would like to show 2 decimals number, you can set scale to 2.
To do so, type:
scale = 2
before you type your computation.
For example:
$ bc
Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006, 2008, 2012-2017 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
scale = 2
3850/700
5.50
Note: I need to figure how to set default to scale = 2
personal computing command-line interface (cli) gnu linux trisquel shell literacy office applications wiki bc offline