function spencef( x ) {
	var flg;
	var w;
	var y;
	var z;

	x = f32( x );
	if ( isnanf( x ) || x < 0.0 ) {
		return NaN;
	}
	if ( x === 1.0 ) {
		return ZERO;
	}
	if ( x === 0.0 ) {
		return PI2O6;
	}
	flg = 0;
	if ( x > 2.0 ) {
		x = f32( ONE / x );
		flg |= 2;
	}
	if ( x > 1.5 ) {
		w = f32( f32( ONE / x ) - ONE );
		flg |= 2;
	} else if ( x < 0.5 ) {
		w = f32( -x );
		flg |= 1;
	} else {
		w = f32( x - ONE );
	}
	y = f32( -w * f32( polyvalA( w ) / polyvalB( w ) ) );
	if ( flg & 1 ) {
		y = f32( f32( PI2O6 - f32( lnf( x )*lnf( ONE-x ) ) ) - y );
	}
	if ( flg & 2 ) {
		z = lnf( x );
		y = f32( -f32( f32( HALF * f32( z*z ) ) + y ) );
	}
	return y;
}
Evaluates Spence's function (the dilogarithm) for a single-precision floating-point number.

## Method

-   A rational approximation gives the integral in the interval (0.5, 1.5).
-   Transformation formulas for \\( \tfrac{1}{x} \\) and \\( 1 - x \\) are employed outside the basic expansion range.

## Notes

-   Relative error:

    | arithmetic | domain      | # trials | peak    | rms     |
    |:----------:|:-----------:|:--------:|:-------:|:-------:|
    | IEEE       | 0,4         | 30000    | 4.4e-7  | 6.3e-8  |

@param {NonNegativeNumber} x - input value
@returns {number} function value

@example
var v = spencef( 3.0 );
// returns ~-1.437

@example
var v = spencef( 0.0 );
// returns ~1.645

@example
var v = spencef( -9.0 );
// returns NaN

@example
var v = spencef( NaN );
// returns NaN