How to Annoy a Math Major

A friend of mine recently started college. I can’t specifically remember what degree plan he settled on–whether electrical engineering or computer science–but I woke up this morning with a humorous (and very geeky) joke in mind that I would like for him to share with his peers. Now, bear with me, because it was insanely funny to me when I first woke up still groggy from the morning haze. As sanity returned, however, the joke seemed markedly less amusing. Here goes:

Q: How might a CS student annoy a first year math major?
A: 0.1 + 0.2 ≈ 0.3

You might find the statement absurd. After all, it truly seems to make little sense that 0.1 plus 0.2 is approximately equal to 0.3. One-tenth and two-tenths equals three-tens. End of story. Right?

Therein lies the problem that first year math students might not appreciate (and one that hopefully CS students would!): Qualify the number base! In base 10, it’s easy enough to represent certain fractions (think 1/10th, 2/5ths, etc.) in a concise decimal representation such as 0.1 or 0.2. Of course, this breaks down with other fractions like 1/3rd or 2/3rds where the decimal representation would be 0.666666 ad infinitum. Incidentally, this is exactly why in the wonderful world of technology, you really can wind up in a situation where 0.1 + 0.2 isn’t exactly 0.3. Just as 1/3rd cannot be represented in decimal without repetition notation, 0.1 (or 1/10th) is a repeating fraction in binary (0.000110011001100110011001100110011…); thus, once the floating point is converted from its binary representation to a human readable format (rather, converting base 2 to base 10), 1/10th (in binary) would appear as 0.100000000000000005551115123126… and so on.

For further examples and a much better description of why this happens than I can write go here.

Edit: October 18. This post was meant as a jestful commentary on number bases and to highlight unexpected issues that aspiring CS majors may run into as they learn to code. I find it necessary to point this out because I have had some acquaintances with heavy mathematics backgrounds grow infuriated with me because they felt that I gloss over a few glaring points (which is intentional). Amusingly, I don’t think they read the title. :)

No comments.
***

Dreams are Weird

I haven’t had much of a chance to catch up on a few things I was hoping to post about, but I had the most unusual experience Tuesday morning. It was so strange, in fact, that I can’t help myself from sharing it with you.

I have almost always had trouble sleeping. As far back as I can remember, I tossed and turned most school nights for whatever silly reasons kept a young boy of that age awake. I suppose it would have been (and may still be) diagnosed as some form of insomnia, but I confess that sometimes–sometimes–it is worth more to me than all the gold in the world.

Monday night/Tuesday morning was one such experience. For the first time in my life, I couldn’t get any sleep because every thirty minutes I was waking up laughing. I’m not talking about a foggy-minded chuckle, either. You know the sort: You’ve stayed up far later than any sane person would otherwise do and everything is just stupidly hialrious. Except it totally wasn’t like that at all. I think I woke up laughing at least 5 times with a loud cackle. Worse, it was my laughter that woke me up. Every time. I really wish I could remember what I was dreaming about each of those times, but I can only recall one. It made absolutely no sense, but the premise was so ridiculous I couldn’t keep myself from laughing.

It would’ve been classified as a partial flash back dream. I know you have all had this sort from time to time: You’re back in school, you’re sitting in a familiar class, maybe the instructor is someone you know–or someone you don’t–and you haven’t any idea what you’re doing there. You’re just there. I don’t recall a great deal about the class other than it was a rather peculiar combination of some room I vaguely recall from high school mixed with about three other locations at two different college campuses. I also recall that it was a mixed class–military, older folks, and younger folks all tossed in together.

Oh, and the marine I was sitting behind in this dream was ranting about some enlisted army man he couldn’t stand. That’s where this dream begins to break down into hilariousness. Not only was the marine complaining out loud, but before he was finished, he pulled a banjo out of thin air and started singing his disgust with his compatriot from another branch of the services. Weirder still, in the middle of his melodic rant about some poor army serviceman, two other guys in the class room pulled out their own banjos and started singing backup vocals. The entire scene was so outrageous and so silly that I started laughing. And laughing. And laughing.

Then I woke up–still laughing.

Sleep deprivation sucks. However, I have to confess something to you: If you’re going to be sleep deprived, it’s just way too awesome to be deprived because you can’t stop laughing in your sleep.

No comments.
***

Holy Crap

So Pedmont (better known as Snobal) discovered that a stupid map I put together several years ago (circa 2002) to describe very roughly where I live has made a lot of rounds on the Internet.

My evil plan is almost complete. If I can subversively bury my work throughout the world, I can control their minds! *evil cackle*

3 comments.
***