Hacker News new | ask | show | jobs
by icebraining 3281 days ago

  $ echo $((1 + 2 * 3 - 4))
  3
1 comments

With zsh, you can even save a few keystrokes.

  function c() {
    echo $(($@))
  }
  alias c='noglob c'
zsh can handle floating point arithmetic too, while bash can't.