[0.26424111765711536, 2.0, 1.0], 'integer a, x < a+1' => [0.63212055882855768, 1.0, 1.0], 'non-integer a' => [1.6918067329451983, 0.5, 2.0], 'x >= a+1, continued-fraction branch' => [11549.765435275602, 10.0, 5.0], 'x tiny, series branch' => [1.2640079074328247e-8, 2.5, 0.001], // the argument the convergence fix targeted: x far past a+1 'deep tail, x >> a' => [6.0, 4.0, 80.0], ]; } public function testIncompleteGammaNonPositiveInputsReturnZero(): void { self::assertSame(0.0, GammaBase::incompleteGamma(2.0, 0.0)); self::assertSame(0.0, GammaBase::incompleteGamma(2.0, -1.0)); self::assertSame(0.0, GammaBase::incompleteGamma(0.0, 1.0)); } }