function lgammaSmallImp( z, zm1, zm2 ) {
	var prefix;
	var result;
	var r;
	var R;

	if ( z < EPS ) {
		return -ln( z );
	}
	if ( zm1 === 0.0 || zm2 === 0.0 ) {
		return 0.0;
	}
	result = 0.0;
	if ( z > 2.0 ) {
		if ( z >= 3.0 ) {
			do {
				z -= 1.0;
				zm2 -= 1.0;
				result += ln(z);
			} while ( z >= 3.0 );
			zm2 = z - 2.0;
		}
		r = zm2 * ( z+1.0 );
		R = rateval1( zm2 );
		result += ( r*Y1 ) + ( r*R );
		return result;
	}
	if ( z < 1.0 ) {
		result += -ln(z);
		zm2 = zm1;
		zm1 = z;
		z += 1.0;
	}
	if ( z <= 1.5 ) {
		r = rateval2( zm1 );
		prefix = zm1 * zm2;
		result += ( prefix*Y2 ) + ( prefix*r );
		return result;
	}
	// Case: 1.5 < z <= 2
	r = zm2 * zm1;
	R = rateval3( -zm2 );
	result += ( r*Y3 ) + ( r*R );
	return result;
}
Evaluates the natural logarithm of the gamma function for small arguments.

## Method

1.  For \\( z > 2 \\), begin by performing argument reduction until \\( z \\) is in \\(\[2,3)\\). Use the following form:

    ```tex
    \operatorname{gammaln}(z) = (z-2)(z+1)(Y + R(z-2))
    ```

    where \\( R(z-2) \\) is a rational approximation optimized for low absolute error. As long as the absolute error is small compared to the constant \\( Y \\), then any rounding error in the computation will get wiped out.

2.  If \\( z < 1 \\), use recurrence to shift to \\( z \\) in the interval \\(\[1,2\]\\). Then, use one of two approximations: one for \\( z \\) in \\(\[1,1.5\]\\) and one for \\( z \\) in \\(\[1.5,2\]\\):

    -   For \(( z \\) in \\(\[1,1.5\]\\), use

        ```tex
        \operatorname{gammaln}(z) = (z-1)(z-2)(Y + R(z-1))
        ```

        where \\( R(z-1) \\) is a rational approximation optimized for low absolute error. As long as the absolute error is small compared to the constant \\( Y \\), then any rounding error in the computation will get wiped out.

    -   For \\( z \\) in \\(\[1.5,2\]\\), use

        ```tex
        \operatorname{gammaln}(z) = (2-z)(1-z)(Y + R(2-z))
        ```

        where \\( R(2-z) \\) is a rational approximation optimized for low absolute error. As long as the absolute error is small compared to the constant \\( Y \\), then any rounding error in the computation will get wiped out.

## Notes

-   Relative error:

    | function | peak         | maximum deviation |
    |:--------:|:------------:|:-----------------:|
    | R(Z-2)   | 4.231e-18    | 5.900e-24         |
    | R(Z-1)   | 1.230011e-17 | 3.139e-021        |
    | R(2-Z)   | 1.797565e-17 | 2.151e-021        |

@private
@param {number} z - input value
@param {number} zm1 - `z` minus one
@param {number} zm2 - `z` minus two
@returns {number} function value