help-bash
[Top][All Lists]
Advanced

[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:08 +0200

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
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]