From Python to Ruby [Float Notation to Decimal]

It was much harder than I thought. I have had very minimal experience
with Ruby and that is why my code is pretty gross. All I need to do now
is reverse the conversion (from decimal-float to Floating Bit Notation).