On Mon, 1 Aug 2005 09:37:43 +1000 Andrew Clausen <[EMAIL PROTECTED]> wrote:
>
> Again, I can't reproduce the problem from the numbers below.  I get
> head_size = 63.  (I was typing in the formulas into python...)
> 
> Perhaps the problem is that "float" doesn't have enough precision.
> So, the first thing to try is replacing "float" with "double"
> throughout probe_partition_for_geom().

I think the floating point code is really unsafe. It doesn't seem to
take care of approximations (or if it does with some magic in the
choice of equations, it should be documented in the comments)

Let's take a simple exemple to illustrate what can happen in FP
arithmetic :

>>> int (1/253.*253.)
0

Using double instead of float won't solve all this class of potential
issues.


Cheers,
Guillaume Knispel



_______________________________________________
Bug-parted mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-parted

Reply via email to