function exp2( x ) {
	var px;
	var xx;
	var n;
	if ( isnan( x ) ) {
		return x;
	}
	if ( x > FLOAT64_MAX_BASE2_EXPONENT ) {
		return PINF;
	}
	if ( x < FLOAT64_MIN_BASE2_EXPONENT ) {
		return 0.0;
	}
	// Separate into integer and fractional parts...
	n = round( x );
	x -= n;

	xx = x * x;
	px = x * polyvalP( xx );
	x = px / ( polyvalQ( xx ) - px );
	x = 1.0 + ldexp( x, 1 );

	// Scale by power of 2:
	return ldexp( x, n );
}
Evaluates the base `2` exponential function.

## Method

-   Range reduction is accomplished by separating the argument into an integer \\( k \\) and fraction \\( f \\) such that

    ```tex
    2^x = 2^k 2^f
    ```

-   A Pade' approximate

    ```tex
    1 + 2x \frac{\mathrm{P}\left(x^2\right)}{\mathrm{Q}\left(x^2\right) - x \mathrm{P}\left(x^2\right)}
    ```

    approximates \\( 2^x \\) in the basic range \\( \[-0.5, 0.5] \\).

## Notes

-   Relative error:

    | arithmetic | domain      | # trials | peak    | rms     |
    |:----------:|:-----------:|:--------:|:-------:|:-------:|
    | IEEE       | -1022,+1024 | 30000    | 1.8e-16 | 5.4e-17 |

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

@example
var v = exp2( 3.0 );
// returns 8.0

@example
var v = exp2( -9.0 );
// returns ~0.002

@example
var v = exp2( 0.0 );
// returns 1.0

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