function mgf( t, p ) {
	if ( isnan( t ) || !isProbability( p ) ) {
		return NaN;
	}
	return ( 1.0-p ) + ( p * exp( t ) );
}
Evaluates the moment-generating function (MGF) for a Bernoulli distribution with success probability `p`.

@param {number} t - input value
@param {Probability} p - success probability
@returns {number} evaluated MGF

@example
var y = mgf( 0.2, 0.5 );
// returns ~1.111

@example
var y = mgf( 0.4, 0.5 );
// returns ~1.246

@example
var y = mgf( NaN, 0.0 );
// returns NaN

@example
var y = mgf( 0.0, NaN );
// returns NaN

@example
var y = mgf( -2.0, -1.0 );
// returns NaN

@example
var y = mgf( 0.2, 2.0 );
// returns NaN