# File lib/ruby-vpi/float.rb, line 9
  def to_f aRadix = 10
    whole, frac = split('.', 2)
    whole = whole.to_i(aRadix).to_f

    if frac
      f = 0.0

      frac.length.times do |i|
        power = i.next
        weight = aRadix ** -power
        digit = frac[i, 1].to_i(aRadix)

        f += digit * weight
      end

      f = -f if self =~ /^-/
      whole += f
    end

    whole
  end