679 680 681 682 683
# File 'lib/rubyhacks.rb', line 679 def to_mathematica_format return "0.0" if self.to_f == 0.0 l = Math.log10(self.to_f.abs).floor return "#{self.to_f / 10.0**(l.to_f)}*10^(#{l})" end