justin = { main feed , music , code , askjf , pubkey };
Ask Justin Frankel
No reasonable question unanswered since 2009!

Suggested topics: programming, music, sleep, coffee, etc.

Note: please do not ask questions about REAPER features, bugs or scheduling, use the forums instead.


Name: Ask: Human (enter yes):
[back to index] | [unreplied] | [replied] | [recent comments] | [all]

Question: Can you explain floating point number storage? How does C/C++ represent a float in memory (binary format)?
Asked by James (24.234.128.x) on May 12 2011, 4:57pm
Reply on May 12 2011, 5:08pm:
    To oversimplify: Think of scientific notation, i.e. x.xxxxx * 10^y, where you have a relatively normal sized number, and a scale.

    Of course, the reality is that rather it being X*10^Y, it is actually +-1.X * 2^Y, with a bit deciding whether its + or -, and some bits to define Y, and the majority of the bits defining X. Then there are some special cases for 0 and infinity and so on...

Comment:
    Your Name:   -- Site Owner's Name:  (for human-verification)

    Comment:    

    
  
[back to index] | [unreplied] | [replied] | [recent comments] | [all]
Copyright 2025 Justin Frankel. | RSS