On Thu, 2007-03-08 at 11:32 -0800, John H. Robinson, IV wrote:
> John H. Robinson, IV wrote:
> >
> > $number =~ /^([01])([01]{11})([01]{26})([01]{26})$/;
> > $s=$1; $e=eval "0b$2"; $f1=eval "0b$3"; $f2=eval "0b$4";
> >
> > $f=$f1 * 1<<26 + $f2;
> > $f=eval "1.$f";
> >
> > $double=-1***$s * 2 **($e-1023) * $f;
>
> This code snippet sucks.
>
> I disavow any knowledge of it, as I merely found it in the gutter and
> thought it looked useful.
>
LMAO!
Reminds me of some things I've written/posted/whatever and looked at
later only to say "WTF?! That sucks!" :)
PGA
--
Paul G. Allen BSIT/SE
Owner/Sr. Engineer
Random Logic Consulting
www.randomlogic.com
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg