Class: Float

Inherits:
Object
  • Object
show all
Defined in:
lib/float.rb

Instance Method Summary collapse

Instance Method Details

#to_flotegerObject



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