function continuedFractionB( gen, factor, maxIter ) {
	var isgenerator;
	var delta;
	var f;
	var C;
	var D;
	var v;

	isgenerator = typeof gen.next === 'function';
	v = ( isgenerator ) ? gen.next().value : gen();
	f = v[ 1 ];
	if ( f === 0.0 ) {
		f = FLOAT32_SMALLEST_NORMAL;
	}
	C = f;
	D = 0.0;
	if ( isgenerator === true ) {
		do {
			v = gen.next().value;
			if ( v ) {
				D = v[ 1 ] + ( v[ 0 ] * D );
				if ( D === 0.0 ) {
					D = FLOAT32_SMALLEST_NORMAL;
				}
				C = v[ 1 ] + ( v[ 0 ] / C );
				if ( C === 0.0 ) {
					C = FLOAT32_SMALLEST_NORMAL;
				}
				D = 1.0 / D;
				delta = C * D;
				f *= delta;
			}
		} while ( v && ( abs( delta - 1.0 ) > factor ) && --maxIter ); // eslint-disable-line no-plusplus
	} else {
		do {
			v = gen();
			if ( v ) {
				D = v[ 1 ] + ( v[ 0 ] * D );
				if ( D === 0.0 ) {
					D = FLOAT32_SMALLEST_NORMAL;
				}
				C = v[ 1 ] + ( v[ 0 ] / C );
				if ( C === 0.0 ) {
					C = FLOAT32_SMALLEST_NORMAL;
				}
				D = 1.0 / D;
				delta = C * D;
				f *= delta;
			}
		} while ( v && ( abs( delta - 1.0 ) > factor ) && --maxIter ); // eslint-disable-line no-plusplus
	}
	return f;
}
Evaluates a continued fraction expansion.

```text
     b0 +    a1
     ---------------
     b1 +     a2
          ----------
          b2 +   a3
               -----
               b3 + ...
```

@private
@param {Function} gen - function giving terms of continued fraction expansion
@param {PositiveNumber} factor - further terms are only added as long as factor*result is smaller than the next term
@param {PositiveInteger} maxIter - maximum number of iterations
@returns {number} evaluated expansion