summaryrefslogtreecommitdiff
path: root/max
diff options
context:
space:
mode:
Diffstat (limited to 'max')
-rwxr-xr-xmax3
1 files changed, 1 insertions, 2 deletions
diff --git a/max b/max
index b2c1cae..15d0003 100755
--- a/max
+++ b/max
@@ -1,10 +1,9 @@
#!/usr/bin/env ruby
-max = -1.0/0
+max = -Float::INFINITY
while line = STDIN.gets
v = line.to_f
max = v if v > max
end
puts max
-