function resolve( idtype, odtype, policy ) {
	var dt;
	if ( policy === 'none' ) {
		return idtype;
	}
	if ( policy === 'output' ) {
		return odtype;
	}
	if ( policy === 'promoted' ) {
		dt = promotionRules( idtype, odtype );
		if ( dt === -1 ) {
			throw new Error( format( 'invalid operation. Unable to promote the input and output data types. Input data type: %s. Output data type: %s.', idtype, odtype ) );
		}
		return dt;
	}
	if ( policy === 'accumulation' ) {
		// If the input data type is floating-point, allow accumulation in that data type as overflow/underflow is handled naturally as a built-in feature of that data type...
		if ( isFloatingPointDataType( idtype ) || idtype === 'generic' ) { // NOTE: we may want to revisit this in the future for float16/complex32, where the value range is much more limited
			return idtype;
		}
		// Unless the input data type value range is larger than the default un/signed integer data type, accumulate in the default un/signed integer data type, as accumulating in smaller range integer data types (e.g., `int8`) are at high risk for overflow, especially for ndarrays containing many elements...
		if ( isUnsignedIntegerDataType( idtype ) ) {
			return promotionRules( idtype, DEFAULT_UNSIGNED_INTEGER_DTYPE );
		}
		if ( isSignedIntegerDataType( idtype ) ) {
			return promotionRules( idtype, DEFAULT_SIGNED_INTEGER_DTYPE );
		}
		// For all other input data types, accumulate in the default real-valued floating-point data type...
		return DEFAULT_REAL_FLOATING_POINT_DTYPE;
	}
	// Check for an explicit data type...
	if ( isDataType( policy ) ) {
		return policy;
	}
	throw new TypeError( format( 'invalid argument. Third argument must be a supported casting policy. Value: `%s`.', policy ) );
}
Resolves the input ndarray casting data type for a unary function.

@param {string} idtype - input ndarray data type
@param {string} odtype - output ndarray data type
@param {string} policy - input ndarray data type casting policy
@throws {TypeError} third argument must be a recognized data type policy
@throws {Error} unexpected error
@returns {string} data type

@example
var dt = resolve( 'float32', 'float64', 'none' );
// returns <string>