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
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;
You can’t perform that action at this time.
0 commit comments