I'm trying to initialize a float to value infinity, and without using INFINITY macro.
float f[] = {
0b01111111100000000000000000000000, // 0x7f800000
0x7f800000 -1,
0x7f800000 -2,
0x7f800000 -64,
0x7f800000 -65
};
Printed:
2139095040.000000
2139095040.000000
2139095040.000000
2139095040.000000
2139094912.000000
Why isn't the first data infinity (like 1 / 0.0) and the others don't change until the last data?
0x7f7fffff should be the biggest value that a float can be and trying here 0x7f80000 is considered infinity.