File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -571,7 +571,8 @@ unittest
571
571
572
572
static assert (is (typeof (factorial(33 )) == Fp! 128 ));
573
573
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);
575
576
576
577
assert (cast (double ) factorial(0 ) == 1 );
577
578
assert (cast (double ) factorial(0 , 100 ) == 1 );
@@ -597,11 +598,8 @@ auto binomialCoefficient
597
598
if (coefficientSize % (size_t .sizeof * 8 ) == 0 && coefficientSize >= (size_t .sizeof * 8 ))
598
599
in (k <= n)
599
600
{
600
- import mir.bignum.fp: Fp;
601
-
602
601
if (k > n - k)
603
602
k = cast (uint )(n - k);
604
-
605
603
auto a = factorial! (coefficientSize, Exp)(k, n - k + 1 );
606
604
auto b = factorial! (coefficientSize, Exp)(k);
607
605
return a / b;
You can’t perform that action at this time.
0 commit comments