[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: To round to the correct nearest number in a Linux basic calculator
From: |
Alex fxmbsw7 Ratchev |
Subject: |
Re: To round to the correct nearest number in a Linux basic calculator |
Date: |
Sun, 26 Sep 2021 01:17:50 +0200 |
im sorry the 3/7 should have been a '3.7'
On Sun, Sep 26, 2021 at 1:17 AM Alex fxmbsw7 Ratchev <fxmbsw7@gmail.com> wrote:
>
> i dont know your bc and dc and so, but maybe try
>
> printf 1\\n2.2\\n3/7 |
> gawk '{ print int( $0 ) }'
>
> On Sun, Sep 26, 2021 at 1:09 AM Budi <budikusasi@gmail.com> wrote:
> >
> > How do we round to the correct nearest number in a Linux basic calculator
> > BC?
> > It just round it down to precision digit number set on 'scale' variable
> >