Derek Wildstar <[EMAIL PROTECTED]> writes:
> On Thu, 15 Jun 2000, Geoffrey Lee wrote:
>
> > no, it's related to a problem that some people can't seem to do mathematics,
> > since everyone knows that there is no real solution for a squre root of a
> > negative number, it becomes a complex number ;)
> >
> > Can the people on this list who had the problem confirm?
>
> I had the problem with a 23g /usr partition. The rest of the setup was as
yep the pb is the correction function. It tries to compute an estimated
installed size based on the sum of sizes of packages. The main correction is the
cluster effect. There is also things like the /var/lib/rpm or /var/lib/urpmi
that takes quite a few space.
So the correction was:
my $A = -1.922e-05;
my $B = 1.18411;
my $C = 23.2;
sub correctSize { max($_[0], ($A * $_[0] + $B) * $_[0] + $C) }
sub invCorrectSize { min($_[0], (sqrt(sqr($B) + 4 * $A * ($_[0] - $C)) - $B) / 2 / $A)
}
pb is that big numbers (> 8gig), it is not adapted. It ends up giving negative
numbers :-/
francois has corrected it, tis now:
my $A = -1.922e-05;
my $B = 1.18411;
my $C = 23.2; #- doesn't take hdlist's into account as getAvailableSpace will do it.
my $D = (-sqrt(sqr($B - 1) - 4 * $A * $C) - ($B - 1)) / 2 / $A; #- $A is negative so a
positive solution is with - sqrt ...
sub correctSize { $_[0] < $D ? ($A * $_[0] + $B) * $_[0] + $C : $_[0] } #- size
correction in MB.
sub invCorrectSize { $_[0] < $D ? (sqrt(sqr($B) + 4 * $A * ($_[0] - $C)) - $B) / 2 /
$A : $_[0]; } #- size correction in MB.
I've not uploaded it yet in cooker, gonna do it now...
cu Pixel.