Code haskell:
bin2dec::[Integer]->Integer
bin2dec (h:[]) = h
bin2dec (h:t) = h*(2^length(t))+bin2dec(t)
bin2frac :: ([Integer], [Integer]) -> Double
bin2frac(x,y) = fromDouble(bin2dec(x)) * 10 ^ bin2dec(y)
Goal:
Define a recursive function that receives a tuple with two binary values representing, respectively, the mantissa and the exponent of a number and returns the corresponding fractional decimal.