lib/torch/inspector.rb in torch-rb-0.2.3 vs lib/torch/inspector.rb in torch-rb-0.2.4
- old
+ new
@@ -23,10 +23,10 @@
if values.any? { |v| v < 0 }
total += 1
end
if floating_point?
- sci = max / min.to_f > 1000 || max > 1e8 || min < 1e-4
+ sci = max > 1e8 || max < 1e-4
all_int = values.all? { |v| v.finite? && v == v.to_i }
decimal = all_int ? 1 : 4
total += sci ? 10 : decimal + 1 + max.to_i.to_s.size