You can also simplify your $min & $max alias to this ( which you can also specifify the token delimiters):
;Syntax: $min(n1 n2 n3,C)
alias min return $gettok($sorttok($$1,$2,n),1,$2)
;Syntax: $max(n1 n2 n3,C)
alias max return $gettok($sorttok($$1,$2,nr),1,$2)
For your $decimal, $round is already built-in with mIRC which does the same thing.