
Recent Posts
Categories
 AltDevBlogADay
 Bugs
 Code analysis
 Code Reliability
 Commuting
 Computers and Internet
 Debugging
 Documentation
 Drinks
 Environment
 Floating Point
 Fractals
 Fun
 Gaming
 Investigative Reporting
 Linux
 Math
 memory
 Performance
 Programming
 Rants
 Security
 Symbols
 Travel
 uiforetw
 Uncategorized
 Unicycling
 Visual Studio
 WLPG
 xperf
Follow me on Twitter
My TweetsMeta
Tag Archives: floating point precision
Float Precision Revisited: Nine Digit Float Portability
Last year I pointed out that float variables can be converted to text and then back to the same binary value using printf(“%1.8e”). You can also use %.9g for more compact results. I also supplied a test program that used … Continue reading
Posted in Floating Point
Tagged float, floating point, floating point precision, printf, scanf
18 Comments
Floatingpoint complexities
Binary floatingpoint math is complex and subtle. I’ve collected here a few of my favorite oddball facts about IEEE floatingpoint math, based on the articles so far in my floatingpoint series. The focus in this list is on float but … Continue reading
Posted in AltDevBlogADay, Floating Point, Programming
Tagged comparing, denormal, digits, float, floating point, floating point precision, floating point tricks, precision, printing
15 Comments
Intermediate FloatingPoint Precision
Riddle me this Batman: how much precision are these calculations evaluated at? If you answered ‘double’ and ‘float’ then you score one point for youthful idealism, but zero points for correctness. The correct answer, for zeroidealism points and forty two … Continue reading
Float Precision–From Zero to 100+ Digits
How much precision does a float have? It depends on the float, and it depends on what you mean by precision. Typical reasonable answers range from 69 decimal digits, but it turns out that you can make a case for … Continue reading
Posted in AltDevBlogADay, Floating Point, Programming
Tagged double, float, floating point, floating point precision, precision, significant figures
51 Comments
Comparing Floating Point Numbers, 2012 Edition
This post is a more carefully thought out and peer reviewed version of a floatingpoint comparison article I wrote many years ago. This one gives solid advice and some surprising observations about the tricky subject of comparing floatingpoint numbers. We’ve … Continue reading
Posted in AltDevBlogADay, Floating Point, Programming
Tagged comparing floats, double, epsilon, float, floating point precision, floating point tricks, precision
217 Comments