Comments on: 5 Useful Ways to Do Arithmetic in Linux Terminal https://www.tecmint.com/arithmetic-in-linux-terminal/ Tecmint - Linux Howtos, Tutorials, Guides, News, Tips and Tricks. Fri, 14 Jul 2023 05:01:58 +0000 hourly 1 By: Valmor https://www.tecmint.com/arithmetic-in-linux-terminal/comment-page-1/#comment-1481990 Mon, 26 Apr 2021 16:09:57 +0000 https://www.tecmint.com/?p=31494#comment-1481990 In reply to Ritesh Kumar Gupta.

This way work on bash and zsh.

❯ echo $((3+4*7+4/2))

on zsh you can also use.

❯ print $((3+4*7+4/2))
]]>
By: Ritesh Kumar Gupta https://www.tecmint.com/arithmetic-in-linux-terminal/comment-page-1/#comment-1318472 Mon, 24 Feb 2020 06:54:51 +0000 https://www.tecmint.com/?p=31494#comment-1318472 Awesome article and very helpful in doing Arithmetic in Linux Terminal.

]]>
By: genek https://www.tecmint.com/arithmetic-in-linux-terminal/comment-page-1/#comment-1239088 Sat, 07 Sep 2019 19:57:25 +0000 https://www.tecmint.com/?p=31494#comment-1239088 Sorry last example works for pyton3, not python.

therefore

python3
27**(1/3)
^d
]]>
By: genek https://www.tecmint.com/arithmetic-in-linux-terminal/comment-page-1/#comment-1239087 Sat, 07 Sep 2019 19:55:28 +0000 https://www.tecmint.com/?p=31494#comment-1239087 and i.e.. (for python)

python
27**(1/3)
^d
]]>
By: genek https://www.tecmint.com/arithmetic-in-linux-terminal/comment-page-1/#comment-1239086 Sat, 07 Sep 2019 19:53:43 +0000 https://www.tecmint.com/?p=31494#comment-1239086 I prefer:

python
1+2
3*(7%2)-1
2**8
7//3
etc.
^D
]]>