From bea9cbaf6dfa5c1bf78dcde86a3126b20bb916dd Mon Sep 17 00:00:00 2001 From: Peter Staab Date: Fri, 9 Feb 2024 07:09:53 -0500 Subject: [PATCH] remove nChooseK code. u --- macros/core/PGauxiliaryFunctions.pl | 2 +- t/macros/numerical.t | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/macros/core/PGauxiliaryFunctions.pl b/macros/core/PGauxiliaryFunctions.pl index 46a8e9c941..a907aa9ae3 100644 --- a/macros/core/PGauxiliaryFunctions.pl +++ b/macros/core/PGauxiliaryFunctions.pl @@ -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; } diff --git a/t/macros/numerical.t b/t/macros/numerical.t index 56227b6ffc..9cfd7c7e2c 100644 --- a/t/macros/numerical.t +++ b/t/macros/numerical.t @@ -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)';