function hys2f1( a, b, c, x, loss ) {
	var intFlag;
	var umax;
	var f;
	var g;
	var h;
	var k;
	var m;
	var s;
	var u;
	var i;

	intFlag = 0;

	if ( abs( b ) > abs( a ) ) {
		f = b;
		b = a;
		a = f;
	}

	if ( isNonPositiveInteger( b ) && ( abs( b ) < abs( a ) ) ) {
		f = b;
		b = a;
		a = f;
		intFlag = 1;
	}

	// eslint-disable-next-line max-len
	if ( ( ( abs( a ) > abs( c ) + 1.0 ) || intFlag ) && ( abs( c-a ) > 2.0 ) && ( abs( a ) > 2.0 ) ) {
		return hyp2f1ra( a, b, c, x, loss );
	}

	i = 0.0;
	umax = 0.0;
	f = a;
	g = b;
	h = c;
	s = 1.0;
	u = 1.0;
	k = 0.0;

	do {
		if ( abs( h ) < EPS ) {
			loss = 1.0;
			return {
				'value': PINF,
				'error': loss
			};
		}
		m = k + 1.0;
		u *= ( ( f+k ) * ( g+k ) * x / ( ( h+k ) * m ) );
		s += u;
		k = abs( u );
		if ( k > umax ) {
			umax = k;
		}
		k = m;
		i += 1.0;
		if ( i > MAX_ITERATIONS ) {
			loss = 1.0;
			return {
				'value': s,
				'error': loss
			};
		}
	} while ( s === 0.0 || abs( u/s ) > MACHEP );

	// Estimate the relative error due to truncation by the series:
	loss = ( ( MACHEP*umax ) / abs( s ) ) + ( MACHEP*i );
	return {
		'value': s,
		'error': loss
	};
}
Evaluates the power series expansion of Gaussian hypergeometric function.

@private
@param {number} a - input value
@param {number} b - input value
@param {number} c - input value
@param {number} x - input value
@param {number} loss - starting loss of significance
@returns {Object} the function value and error