16 Aug 2011 nutella   » (Master)

No Pi for you!
I am using commercial program that is well-known in the field in which I work. It has a scripting language for building models in a flexible manner but most of the code I have written has been quite straightforward. More recently I had to come up with something a little more elaborate and it was only then I realised that the language is hanging firmly to its Fortran underpinnings. The two main clues were; 1) no definition of Pi, and 2) trigonometric functions limited to SIN, COS and ATN. This took me back more than 30 years to when I was programming in BASIC for an ICL 2900 machine. For my current script I needed arccosine and my maths teachers will not be surprised to know that I had forgotten the half-angle equivalence that allows you to calculate ACOS using ATN (thanks Wikipedia). For Pi, since I was already wimping out, I eschewed the usual 355/113, or even something like 833719/265381, and instead used Machin's approximation (as that also uses ATN).

This weekend I decided to watch O Lucky Man! for the first time in ages - it takes a good while to gird oneself up to deal with that one scene (you know which one). It was only while watching it this time that I noticed the strange resemblance between Alan Price and Steve Jobs. For those of you not familiar with Mr. Price, try the image here. Maybe I am imagining things as as putting "Steve Jobs" and "Alan Price" in The Google doesn't result in any "separated at birth?" theories. Maybe it's the Tyneside accent that puts people off...

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!