ruby/benchmark/bm_vm1_float_simple.rb

8 строки
112 B
Ruby

i = 0.0; f = 0.0
while i<30_000_000
i += 1
f += 0.1; f -= 0.1
f += 0.1; f -= 0.1
f += 0.1; f -= 0.1
end