class Numeric
Public Instance Methods
to_mathematica_format()
click to toggle source
# 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