return LongLib.mul(n, fact(LongLib.sub(n, LongLib.fromInt(1))));
}
}
private LongEmul longFromBits(int top, int bottom) {
LongEmul topHalf = LongLib.shl(LongLib.fromInt(top), 32);
LongEmul bottomHalf = LongLib.fromInt(bottom);
if (LongLib.lt(bottomHalf, Const.ZERO)) {
bottomHalf = LongLib.add(bottomHalf, LongLib.shl(LongLib.fromInt(1), 32));
}
LongEmul total = LongLib.add(topHalf, bottomHalf);
return total;
}