I am currently trying to build a program which prints an input float value to binary.
The first bit is 0 if positive or 1 if negative, but with an input value of e.g.: -0.0g my if statement always prints 1, also for a positive input. How would I check that correctly?
string sign = "sign: ";
if(value <= -0.0f)
sign.append("1\n");
else if (value >= 0.0f)
sign.append("0\n");
...