Re: [genius-list] [PATCH] for doozy

From: George <jirka_at_5z.com>
Date: Mon, 11 Oct 1999 23:54:52 -0700

On Sun, Oct 10, 1999 at 07:38:37PM -0400, Squeak wrote:
> It appears to be a "quirk" /bug in gmp... this problem may be more
> pervasive ... basically here's a rule of thumb: never ever ever ever
> compare floating points. On a 68020 under CodeWarrior (5ish) in optimizing
> mode "if(0.0==0.0)" is FALSE.

Not exactly a gmp quirk, but it just so happens that during the power series,
sometimes the last and current are ALWAYS different in the last bit, this is
easily solved by just comparing the precision that we will actually return
instead of the entire numbers, I fixed this in cvs now

George

-- 
------------------------------------------------------------------------------
George Lebl <jirka@5z.com> http://www.5z.com/jirka/
------------------------------------------------------------------------------
  The following implements RSA in perl and is illegal to export from the US:
          #!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
          $/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
          lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)
Received on Mon Oct 11 1999 - 23:55:06 CDT

This archive was generated by hypermail 2.2.0 : Sun Apr 17 2011 - 21:00:02 CDT