PageRenderTime 46ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/_posts/archived/2006-09-22-laptop_warmer_anecdote.aspx.markdown

https://gitlab.com/Blueprint-Marketing/haacked.com
Markdown | 40 lines | 35 code | 5 blank | 0 comment | 0 complexity | f3f88aae65af8797758f8e48c5f17675 MD5 | raw file
  1. ---
  2. layout: post
  3. title: "Laptop Warmer Anecdote"
  4. date: 2006-09-22 -0800
  5. comments: true
  6. disqus_identifier: 17061
  7. categories: []
  8. ---
  9. I saw [this story](http://www.qdb.us/53151) on the [debugging section of
  10. Anecdota](http://www.anecdota.org/debugging/) and thought it was funny,
  11. though I find it hard to believe.
  12. > ### Laptop warmer {.post-title}
  13. >
  14. > In 1998, I made a C++ program to calculate pi to a billion digits. I
  15. > coded it on my laptop (Pentium 2 I think) and then ran the program.
  16. > The next day I got a new laptop but decided to keep the program
  17. > running. Its been over seven years now since I ran it. and this
  18. > morning it finished calculating. The output:
  19. >
  20. > THE VALUE OF PI TO THE BILLIONTH DIGIT IS =
  21. >
  22. > Mindblowing eh? I looked in the code of my program, and I found out
  23. > that I forgot to output the value.
  24. You would think hed do a test run for smaller digits of PI, but Ive
  25. done things like that.  You make a small test run. It works. You make a
  26. tiny tweak that shouldn't affect anything and then start it running
  27. because you're in a hurry.  Seven years later...
  28. Of course, most (if not all) algorithms for calculating PI arent all or
  29. nothing.  Usually they start calculating digits immediately, so
  30. there ought to be immediate output as you calculate PI to further and
  31. further digits, unless this person decided to store all billion digits
  32. in a string before displaying it.
  33. tags: [C++](http://technorati.com/tag/C%2B%2B),
  34. [Bugs](http://technorati.com/tag/Bugs),
  35. [PI](http://technorati.com/tag/PI)