C++ float
datatype. It consists of a one bit sign, the 8 bit exponent and 23 bits that store the fractional part of the value. float x = [sign (1 bit) | exponent (8bit) | fraction (23bit)]We can use this knowledge about the memory-layout in order to change the sign of floating point values without the need for floating point arithmetic.