Top Eight Entertaining Blog Facts for 2012

The end of the year is a traditional time for lists and I thought I’d do a post just to summarize the most interesting or surprising things that I discovered while writing this blog during 2012.

While doing research for blog posts, or getting feedback on posts, or from comments on posts, I sometimes end up learning unexpected things about the topic about which I am writing. These aren’t necessarily the most useful things to be found in my blog posts, but they entertained me, and I hope they entertain the readers. Here they are, in date order, the top eight of 2012:

  1. It is well known that the transcendental number pi cannot be accurately represented as a double-precision number. What’s less well known is that the error in double(pi) can be measured extremely accurately with sin(double(pi)).
  2. It can take 112 digits to precisely print the mantissa of a 32-bit float.
  3. std::async is surprisingly easy to use.
  4. Intermediate float precision is far less well defined than I thought.
  5. In some situations Windows silently ignore application crashes and let the process keep on running!
  6. Jetpacks!
  7. I found out that my backup drive was triggering a 4 GB allocation. The bug was then fixed.
  8. While the x86 assembly language integer instructions sub and add are virtually identical, in some cases sub can be three or even four times faster than add.

About brucedawson

I'm a programmer, working for Google, focusing on optimization and reliability. Nothing's more fun than making code run 10x as fast. Unless it's eliminating large numbers of bugs. I also unicycle. And play (ice) hockey. And sled hockey. And juggle. And worry about whether this blog should have been called randomutf-8. 2010s in review tells more: https://twitter.com/BruceDawson0xB/status/1212101533015298048
This entry was posted in Bugs, Floating Point, Performance, Programming and tagged , , , . Bookmark the permalink.

1 Response to Top Eight Entertaining Blog Facts for 2012

  1. Guillaume says:

    Thank you Bruce for your wonderful articles! Valve is very lucky to have you.
    Wish you the best for 2013!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.