On 9/29/06, Paul Robinson <paul / iconoplex.co.uk> wrote:
> 2 tries to pass? It doesn't work for all cases then! Cheat! :-)

Only for  x*y >= 100, which is true for the majority of the test cases
(2/3 or so), and it's only tested three times :)

> You can't 'include' anything, but PHP comes bundled with a huge
> standard API compared to the standard Ruby stack. This makes it
> bloated and horrible to work with (especially as how you call it and
> what you get back is inconsistent across the whole thing), but it
> does mean they can do some interesting things when playing Code Golf.
>
> It's been ages since I did any PHP, but I can immediately think how
> to do your pi solution in less bytes in PHP, and I think there's a
> way of using the API to do it in even less than that. As it is, I'm
> Golfing to improve my Ruby kung-fu, not to win, so I'm happy with my
> bloated solutions that are elegant in their own way. :-)

I'm familiar with PHP, but don't know any 'give me pi to n digits'
function. I thought it was more likely there was function in there
somewhere which could be used to cheat.
The PHP solutions aren't there anymore, so I guess they were removed
for cheating.

As for getting bytes off the pi program, did you actually manage to do
this or do you only think it's possible? For me, when thinking of a
way to make something shorter, the result often turns out to be the
same size (or even larger) than the original.