Mega Code Archive
Categories
/
Ruby
/
Language Basics
Force exponential notation
puts '%e' % 1234.567 # => '1.234567e+03': force exponential notation