I have extracted mantissa (significand) and exponent from a string.
For example, with a string "123.45e6" I have mantissa: 12345 and exponent: 4.
Now the trouble comes with conversion of such information to float or double. I tried to move it back to the form of string ("12345e4" from the example) and then to use std::strtof() or std::strtod() functions.
Is there any better way to do so? I would love to handle cases where float or double overflows i.e. when it is not able to handle such a big mantissa or exponent. In case of mantissa it is relatively simple as the number of bits of both float and double mantissas is well known, but what about the 10-base exponent?