I want to create a binary represenation of a floating-point number and be able to parse that number back when needed. By "binary representation" I do not mean "0.00101
" but something like "101000101
", that is to say, a sequesnce of 0
's and 1
's with no decimal separator. I need a way to both create such representation in String
for a double
and to parse a double
of a String
.
Please do not mention the X Y problem because I do definitly need this method (something like "unsigned binary value").
Thank you in advance.
Convert Double to Binary representation? seemed to solve the problem with parsing double
to String
but I still need help with doing the opposite: from binary to double
.