xref: /freebsd/contrib/one-true-awk/testdir/t.arith (revision ebacd8013fe5f7fdf9f6a5b286f6680dd2891036)
1{ print NR, $1, $1+$1, $1-$1, $1 * $1 }
2{ print NR, $1/NR, $1 % NR }
3# { print NR, $1++, $1--, --$1, $1-- }  # this depends on order of eval of args!
4{ print NR, -$1 }
5$1 > 0 { print NR, $1 ^ 0.5 }
6$1 > 0 { print NR, $1 ** 0.5 }
7