lunes, 6 de abril de 2020

How to do integer & float calculations, in bash or other languages/frameworks?

https://unix.stackexchange.com/questions/40786/how-to-do-integer-float-calculations-in-bash-or-other-languages-frameworks

How to do integer & float calculations, in bash or other languages/frameworks?

$ python -c "print(20+5/2)"
$ python -c "print(20+5/2.0)"
$ perl -E "say 20+5/2"
$ printf %.10f\\n "$((10**9 * 20/7))e-9"   # many shells. Not mksh.



No hay comentarios:

Publicar un comentario