1 / 3 = 0

Friday, September 30th, 2005...3:53 am

Jump to Comments

Yep, that’s right. And I even used a computer to work it out.

I was up til 5 this morning writing a couple of python scripts to trawl through the data from the Reality Mining project @ MIT Media Lab and work out how complete the data was. At 3AM the last thing you need to find out is that Python automatically tries to keep your types consistent. Therefore, 1 / 3 = 0 because integer / integer = integer, whereas 1.0 / 3.0 = 0.33333 (because float / float = float).

Ghastly

1 Comment

  • I hate stuff like this. I hate it how pipe sizes are now ‘metric’, so it’s now 80mm nominal bore. But of course the pipe sizes haven’t changed, just the names. So it’s actually 4″ nominal bore, which is 101.6 nominal bore. But then since the pipe is actually defined by outer diameter and wall thickness the bore is nothing like this at all anyway. Stupid or what?

    And then there’s video frame rates. NTSC is 29.97 fps but always gets referred to as 30fps when it’s not.

    Enough to send you loopy

Leave a Reply