Skip to content

Commit

Permalink
remove nChooseK code.
Browse files Browse the repository at this point in the history
u
  • Loading branch information
pstaabp committed Feb 9, 2024
1 parent 0488040 commit bea9cba
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
2 changes: 1 addition & 1 deletion macros/core/PGauxiliaryFunctions.pl
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ =head2 repeated function
sub repeated {
my @return;
for my $x (@_) {
push(@return,$x) if (grep { $_ == $x } (@_)) > 1;
push(@return, $x) if (grep { $_ == $x } (@_)) > 1;
}
return @return;
}
Expand Down
7 changes: 0 additions & 7 deletions t/macros/numerical.t
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,6 @@ subtest 'Quadrature - Open Newton-Cotes' => sub {
is newtonCotes($f, 0, 2, n => 1, method => 'open4'), 8 / 3, 'Newton-Cotes (open, k=4) of x^2 on [0,2]';
};

subtest 'nChooseK' => sub {
is nChooseK(5, 3), 10, '5 choose 3 = 10';
is nChooseK(10, 8), 45, '10 choose 8 = 45';
is nChooseK(10, 4), 210, '10 choose 4 = 210';
is nChooseK(10, 6), 210, '10 choose 6 = 210';
};

subtest 'Legendre Polynomial' => sub {
my $leg3 = legendreP(3);
is &$leg3(0.5), (5 * (0.5)**3 - 3 * (0.5)) / 2.0, 'testing legendreP(3,0.5)';
Expand Down

0 comments on commit bea9cba

Please sign in to comment.