Re: bc - calculator
On Fri, 17 Nov 2000, Christoph Simon wrote:
> On Fri, 17 Nov 2000 13:39:21 +0100
> Joerg Johannes <liste_joerg@gmx.de> wrote:
>
> > This was really great and saved me hours of time. The problem is now,
> > that I have to do the same thing with divisions, meaning 3/4 = 0.75. But
> > bc spits out 3/4 => 0 and 4/3 => 1. Any Idea how I can change this
> > behaviour to get the real results? Would save me some more hours...
>
> I don't use bc but dc. There I have to say
> 5 k
> to get 5 digits of decimal fractions. In bc, syntaxis is different, but
> probably you'll have to do something similar.
in bc use scale = 5 to get 5 digits after decimal point. check bc(1) for
more details and examples
[]s
Mario O.de Menezes "Many are the plans in a man's heart, but
IPEN-CNEN/SP is the Lord's purpose that prevails"
http://curiango.ipen.br/~mario Prov. 19.21
http://www.revistalinux.com.br
Reply to: