Quantcast convert 1/3 to Floating Point Text - Physics Forums Library

PDA

View Full Version : convert 1/3 to Floating Point


khdani
Nov14-08, 05:17 AM
Hello,
How do i convert 1/3 to floating point (IEEE 754) ?

CRGreathouse
Nov14-08, 11:07 AM
float n = 1.0 / 3;

khdani
Nov14-08, 11:12 AM
i meant the actual representation of the number, not variable.
[Sign Bit] [8bit EXP] [23bit Mantissa]
but i've solved it , thanks anyway.