3cf59d321a
* NEW: Files can be dropped from files managers to the project treeview. They are automatically inserted into the project then. [WIKI CGI SCRIPT] * BUG: '{' and '}' are not interpreted anymore between '=='. [BENCHMARKS] * NEW: Add Gambas/Perl/Python benchmarks to the repository. [INTERPRETER] * NEW: A Stop instruction encountered inside a component is not ignored anymore and stops the program. * BUG: Fix the File.SetName, File.SetExt and File.SetBaseName methods. [COMPILER] * NEW: The preprocessor now undestands the False and True constants. [GB.FORM] * NEW: Clean up the Stock class icon loading algorithm. * BUG: Fix the Gnome icon map. [GB.FORM.STOCK] * NEW: Support for svg stock icons. [GB.QT4] * BUG: Drag.Show() now works for DnD operations started outside of the application. [GB.GTK] * BUG: Drag.Show() now works for DnD operations started outside of the application. git-svn-id: svn://localhost/gambas/trunk@3400 867c0c6c-44f3-4631-809d-bfa615b0a4ec
35 lines
409 B
Perl
Executable file
35 lines
409 B
Perl
Executable file
#!/usr/bin/perl -w
|
|
|
|
use strict;
|
|
|
|
sub poly($)
|
|
{
|
|
my $n = 500000;
|
|
my $x = $_[0];
|
|
|
|
my $mu = 10;
|
|
my $pu = 0;
|
|
|
|
my @pol;
|
|
|
|
foreach (0 .. $n - 1) {
|
|
foreach (0 .. 99) {
|
|
$pol[$_] = $mu = ($mu + 2) / 2;
|
|
}
|
|
|
|
my $s = 0;
|
|
foreach (0 .. 99) {
|
|
$s = $x * $s + $pol[$_];
|
|
}
|
|
|
|
$pu += $s;
|
|
}
|
|
|
|
return $pu;
|
|
}
|
|
|
|
my $res;
|
|
for (1..10) {
|
|
$res = poly(0.2);
|
|
print "$res\n";
|
|
}
|