Clone
jm-tech-power-official/jmlang.jmproj
math.jml
func math.max a b
if $a < $b
ret $b
end
ret $a
end
func math.min a b
if $a < $b
ret $a
end
ret $b
end
func math.abs x
if $x < 0
ret 0 - $x
end
ret $x
end
func math.pow a b
set i 1
set ans 1
while $i <= $b
set ans $ans * $a
set i $i + 1
end
ret $ans
end
func math.gcd a b
if $b == 0
ret $a
end
call math.gcd $b , $a % $b
ret $ret
end