Michi’s blog » archive for December, 2008

## J, or how I learned to stop worrying and love the matrix

• December 10th, 2008
• 8:50 am

Or actually, I haven’t quite yet.

But, out of a whim, I downloaded J and started to play with it while reading this set of neat notes on Functional Programming and J.

And … well … my reaction so far is kinda “Buh!? What the *** just happened there?”

The first example I ran across, tried to read, and finally managed to is the following:

+/ , 5 = q: >: i. 100

This snippet is supposed to tell us how many 0s are trailing 100!. To get at this, we first need to figure out what, exactly, is done here. First observation is that 100! is the product of all integers from 1 to 100. The second is that the number of 0s trailing this is the same as the lower of the orders of 2 and 5, respectively, dividing 100!. Which, in turn is the lower of the numbers of 2s and 5s occurring in the totality of all prime decompositions of all the integers from 1 to 100.

## So that must mean I’ve been a mathematician since 2005?

• December 8th, 2008
• 4:03 am

http://www.thesun.co.uk/sol/homepage/features/article2011061.ece

This is a rather atrocious article giving yet another ad hoc “formula” to compute some numeric measurement of something-or-other. In this particular case, it’s about cleavage, and how to avoid showing too much of it, but these “formulae” plague us every time some journalist wants to math up their reporting.

What caught my eye in this particular case was the people they lined up to back up the story.

Mathematician William Hartston, who holds an MA in Maths from Cambridge University, reckons this will save a lot of showbiz blushes on the red carpet.

“A girl can use this formula to see whether her outfit is counted as decent,” says William, author of Drunken Goldfish and Other Irrelevant Scientific Research.

So. He has a Masters in mathematics. Big whoop. Doesn’t seem to make him more able to distinguish nonsense when he sees it.