7 Jul
2018
7 Jul
'18
13:26
07.07.2018 15:50, Carlos E. R. пишет:
Hi,
Do we have something that would round a number in a script?
This obviously depends on script language (and there are more than one shell and some of them support floating point arithmetic). Off the head bor@bor-Latitude-E5450:~$ dc -e '1.6 0.3 + 1 / p 1.6 0.5 + 1 / p' 1 2 (final deletion due to addition ignoring precision).