Floating point image

Everything todo with programming goes HERE.
Post Reply
User avatar
Jonathan
A Brave Victim
Posts: 3391
Joined: Thu Feb 03, 2005 12:50 am
Location: Not really lurking anymore

Floating point image

Post by Jonathan »

I made this to try to explain floating point to someone and figured it shouldn't go to waste. Maybe it will bring inspiration or peace and happiness to somebody.

The lower red boxes indicate precision, if that wasn't clear.

Thoughts:
- The negative could actually go negative if you have some space.
- Type all the bit patterns.
- Flip the bits 180° in the positive range and turn the up-down pattern around at zero. Get rid of that pattern if you have the room.
- Enlarge range boxes by half an ulp (or two pixels here). AKA don't do 4x4 gridded drawing all the time.
- Tweak the dark/medium/light lines a bit, maybe leave the largest finite as light.
- The difference between 15.5 and infinity is not 1/2.
- Linear value could be interesting.
- Make some for other float formats, not just 1.3.4 which is never seen in the wild. 1.11.52 should be fun to do.
- Decimal floating point with DPD and all?
Attachments
float.png
ˌɑrməˈɡɛˌtrɑn
Post Reply