Skip to content

Commit 88d99b6

Browse files
committed
fixup
1 parent 42ddd59 commit 88d99b6

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

source/mir/math/numeric.d

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,8 @@ unittest
571571

572572
static assert(is(typeof(factorial(33)) == Fp!128));
573573
static assert(is(typeof(factorial!256(33)) == Fp!256));
574-
static assert(cast(double) factorial(33) == 8.68331761881188649551819440128e+36);
574+
static immutable double f33 = 8.68331761881188649551819440128e+36;
575+
static assert(cast(double) factorial(33) == f33);
575576

576577
assert(cast(double) factorial(0) == 1);
577578
assert(cast(double) factorial(0, 100) == 1);
@@ -597,11 +598,8 @@ auto binomialCoefficient
597598
if (coefficientSize % (size_t.sizeof * 8) == 0 && coefficientSize >= (size_t.sizeof * 8))
598599
in (k <= n)
599600
{
600-
import mir.bignum.fp: Fp;
601-
602601
if (k > n - k)
603602
k = cast(uint)(n - k);
604-
605603
auto a = factorial!(coefficientSize, Exp)(k, n - k + 1);
606604
auto b = factorial!(coefficientSize, Exp)(k);
607605
return a / b;

0 commit comments

Comments
 (0)