Class: Float
- Inherits:
-
Object
- Object
- Float
- Defined in:
- lib/float.rb
Instance Method Summary collapse
Instance Method Details
#to_floteger ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/float.rb', line 2 def to_floteger s = self.to_s #f = Floteger.new if s =~ /e/ v,e = s.split('e') e = e.to_i f = simple_floteger(v) f ** e #a,b = v.split('.') #e = e - b.length #v = a + b #return Floteger.new(v,e) else simple_floteger(s) end end |