function compile( P, Q, options ) {
	var opts;
	var tmpl;
	var str;
	var n;
	var r;

	opts = {
		'dtype': 'float64'
	};
	if ( arguments.length > 2 ) {
		opts.dtype = options.dtype || opts.dtype;
	}
	n = P.length;

	// If no coefficients, the function always returns NaN...
	if ( n === 0 ) {
		return NAN_TEMPLATE;
	}
	// If P and Q have different lengths, the function always returns NaN...
	if ( n !== Q.length ) {
		return NAN_TEMPLATE;
	}
	r = P[0] / Q[0];
	if ( opts.dtype === 'float32' ) {
		P = new Float32Array( P );
		Q = new Float32Array( Q );
		r = float64ToFloat32( r );
	}
	// If P and Q only have one coefficient, the function always returns the ratio of those coefficients...
	if ( n === 1 ) {
		return replace( COEFFICIENT_RATIO_TEMPLATE, '{{ratio}}', value2string( r ) );
	}
	// Avoid exceeding the maximum stack size on V8 by using a simple loop :(. Note that the choice of `500` was empirically determined...
	if ( n > 500 ) {
		if ( opts.dtype === 'float32' ) {
			tmpl = LOOP_FLOAT32_TEMPLATE;
		} else {
			tmpl = LOOP_TEMPLATE;
		}
		str = replace( tmpl, '{{P}}', array2list( P ) );
		str = replace( str, '{{Q}}', array2list( Q ) );
		return replace( str, '{{ratio}}', value2string( r ) );
	}
	// If more than one coefficient, apply Horner's method...
	if ( opts.dtype === 'float32' ) {
		tmpl = EVALRATIONAL_FLOAT32_TEMPLATE;
	} else {
		tmpl = EVALRATIONAL_TEMPLATE;
	}
	str = replaceString( tmpl, 'P_ASCENDING', hornerAscending( P, opts.dtype ) );
	str = replaceString( str, 'Q_ASCENDING', hornerAscending( Q, opts.dtype ) );
	str = replaceString( str, 'P_DESCENDING', hornerDescending( P, opts.dtype ) );
	str = replaceString( str, 'Q_DESCENDING', hornerDescending( Q, opts.dtype ) );
	return replace( str, '{{ratio}}', value2string( r ) );
}
Compiles a module string which exports a function for evaluating a rational function.

@param {NumericArray} P - numerator polynomial coefficients sorted in ascending degree
@param {NumericArray} Q - denominator polynomial coefficients sorted in ascending degree
@param {Options} [options] - function options
@param {string} [options.dtype='float64'] - input value floating-point data type
@returns {string} module string exporting a function for evaluating a rational function

@example
var P = [ -6.0, -5.0 ];
var Q = [ 3.0, 0.5 ];

var str = compile( P, Q );
// returns <string>