Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Could anyone help me? Thanksfor($x = $prevmax;$x<=$max;$x++) { $n = sqrt($x); $i = 0; while ($x%$p[$i] !=0) { $i++; if (($n < $p[$i]) & ($x > $p[-1])) # error here { print (1 & ($x > $p[-1])); push(@p,$x."\n"); last; } } }
Considered by xdg: "retitle 'uninitialized value in modulus'"
Unconsidered by davido: Final vote of 11/26/0 indicated significant opposition to retitling.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Modulus zero error
by BrowserUk (Patriarch) on Dec 24, 2004 at 05:13 UTC | |
by Anonymous Monk on Dec 24, 2004 at 05:19 UTC | |
by sasikumar (Monk) on Dec 24, 2004 at 05:46 UTC | |
by Anonymous Monk on Dec 24, 2004 at 06:29 UTC | |
by maa (Pilgrim) on Dec 24, 2004 at 07:52 UTC | |
| |
by ysth (Canon) on Dec 24, 2004 at 05:50 UTC | |
|
Re: Modulus zero error
by hv (Prior) on Dec 24, 2004 at 12:34 UTC | |
|
Re: Modulus zero error
by xdg (Monsignor) on Dec 24, 2004 at 13:42 UTC | |
|
Re: Modulus zero error
by Anonymous Monk on Dec 24, 2004 at 21:36 UTC | |
|
Re: Modulus zero error
by jalewis2 (Monk) on Dec 25, 2004 at 02:45 UTC |