Monthly Archives: October 2013

Truncation to N Decimal Places in Python

I recently needed to truncate some IEEE 754 64bit floating point numbers to a given number of decimal places. I assumed Python would have built-in support for this. Not so.

Now there are reasons for this. The primary one being that you can’t really truncate floating point numbers. Now that being said – if you need to – I present here a good way to approximate the effect.

Continue reading

In The Mouth of Madness – Blu-ray vs iTunes

In The Mouth of Madness in the end of director John Carpenter’s informal ‘Apocalypse Trilogy’, a dark Lovecraftian horror film staring Sam Neill. Written by Michael De Luca, there are no happy endings in this story.

The film had mixed reviews upon release and did little business, and it’s not hard to see why. Lacking the real world chill and terrifying body horror effects of ‘the Thing’, and without the nail-biting tension of ‘Prince of Darkness’ it is easily the weakest entry in the Apocalypse Trilogy. Sam Neill’s character is baffled throughout, as is the audience, as there is little logic to any of the events that occur. Characters deaths are effectively Deus ex machina that occur because the story needs them to happen. You could almost draw parallels with Spike Jonze and Charlie Kaufman’s 2002 ‘Adaptation’, or perhaps the later ‘Synecdoche, New York’.

Anyway – I actually caught the film at a Cinema in London when it was first released, and watched it (almost alone), and kinda enjoyed it.

Long absent from high definition disc, I took a look at the HD iTunes version to see if it was worth recommending a little while ago, and emerged disappointed, it has a soft DVNR’d picture that looked as if it had possibly been upscaled, at best 2 out of 5. I didn’t bother posting a review.

However since the Blu-ray has been previewed on some sites, I thought I’d compare the two using some screenshots borrowed from DVDBeaver.

The verdict ?

In The Mouth of Madness, iTunes HD on the left, Blu-ray on the right. Spot the orange and teal.

In The Mouth of Madness, iTunes HD on the left, Blu-ray on the right. Spot the orange and teal. Not exactly the same frame, but close enough.

While the iTunes edition has it’s problems (sharpness, halos, DVNR), the obvious Orange-and-Teal tampering with the Blu-Ray edition makes it hard to recommend.

Verdict: Both disappointing. But at least the world isn’t coming to an end.