Re: [Cooker] error can't take sqrt of -1.00526

2000-06-16 Thread Pixel

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.




RE: [Cooker] error can't take sqrt of -1.00526

2000-06-15 Thread Geoffrey Lee




 Hi,

 According to this 7.1 review:

http://www.linuxnewbie.org/articles/mdk7.1_review.html

the famous (erhm) error "warning: can't take sqrt of -1.00526 at
/usr/bin/perl-install/pkgs.pm line 186" seems to be related to a "/"
partition bigger than 8 Gbytes.





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?


--
Guillaume Cottenceau




RE: [Cooker] error can't take sqrt of -1.00526

2000-06-15 Thread Derek Wildstar

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
follows:

/ 500m
/var 500m
/tmp 1g
/usr 23g

I cut /usr down to 8g and made the rest /usr/local and it seemed to fix
the problem.  Is someone using an unsigned long conversion instead of
unsigned long long? (well I know it's not C but i know c not perl :p)

-dwild