aboutsummaryrefslogtreecommitdiff
path: root/challenge-031/stuart-little/lua/ch-1.lua
blob: 90ec6bd6a9a011521e83870e8c63aa1ccbe8ee5b (plain)
1
2
3
4
5
6
#!/usr/bin/env lua

-- run <script> <numerator> <denominator>

local frac=arg[1]/arg[2]
print((frac ~=frac or frac==math.huge or frac==-math.huge) and "divided by zero" or frac)