Re: [PHP] PHP Brainteasers 2011

2011-05-23 Thread Daniel Brown
On Fri, May 20, 2011 at 12:55, Marc Guay m...@jkcommunications.com wrote: I imagine this one's been done before, but maybe not in the same way I believe it was, but not quite the same, you're right. If at first you don't succeed, try, try again. Nice one, Marc. ?php  

Re: [PHP] PHP Brainteasers 2011

2011-05-23 Thread tedd
At 11:29 AM -0400 5/23/11, Daniel Brown wrote: On Fri, May 20, 2011 at 12:55, Marc Guay m...@jkcommunications.com wrote: I imagine this one's been done before, but maybe not in the same way I believe it was, but not quite the same, you're right. If at first you don't

Re: [PHP] PHP Brainteasers 2011

2011-05-20 Thread Alex Nikitin
what's the scope? I have some brain-teasing functions i've been working on, but they are far from bulletproof, but here is an example function float_int($significand) { $sign = ($significand0) ? true : false; $significand = abs($significand); $drep = (decbin( (int) $significand));