Pages

Saturday, February 16, 2008

Saturday! (Open Thread)

Today's open thread topic is...

What was the most interesting thing you worked on this week?

For me, that was tracking down one particular bug in the simulator which was causing an assertion to fail. Those familiar with C/C++ coding may recognize that assertions are things which should never fail, if your program is correct. Well, in my case it wasn't, as a particular assertion kept failing in VERY rare cases. Like, needing millions or billions of trials to get a run where it failed. This makes tracking it down very tough. However, I managed to finally figure it out! It turns out to be a case where a floating point number is exactly 0. So it wasn't > 0.0, but it also was not negative. This edge case was being checked in the wrong way, and that was causing the assertion to fail. Why was it so rare? The number was being generated by a random number generator, the chance of it actually being 0 was incredibly small. But it did happen, and I finally tracked it down.

2 comments:

Mason said...

I didn't get a chance to do any calculations per se, so I'll go with one of my few non-teaching things: revising the draft of an expository article that I meant to submit in late 2005. (It will hopefully actually go out to American Scientist this spring.)

Lidarose said...

By far the most interesting thing I "worked on" last week was helping to care for J & F's nephews on Tuesday afternoon :-) The other really interesting thing that happened last week (besides the visit from J & F) was a seminar of sorts that I attended on Saturday at The Oratory with speaker Dr. Scott Appleby from Notre Dame, and a wonderful string quartet in the afternoon between the two talks.