function resolve( xdtype, policy ) {
	switch ( policy ) {
	case 'same':
		return xdtype;
	case 'floating-point':
		// TODO: we may want to delegate checking for a floating-point dtype to a utility function/package (e.g., isFloatDtype), in order to centralize logic for testing whether a dtype is "floating-point". Otherwise, this will be yet another place to update logic should we ever add, e.g., a `float128` or `float16` dtype.
		if (
			xdtype === 'float64' ||
			xdtype === 'float32' ||
			xdtype === 'generic' ||
			xdtype === 'complex128' ||
			xdtype === 'complex64'
		) {
			return xdtype;
		}
		return 'float64'; // TODO: constants/math/default-real-floating-point-dtype?
	case 'real floating-point':
		if (
			xdtype === 'float64' ||
			xdtype === 'float32' ||
			xdtype === 'generic'
		) {
			return xdtype;
		}
		return 'float64';
	case 'complex floating-point':
		if (
			xdtype === 'complex128' ||
			xdtype === 'complex64'
		) {
			return xdtype;
		}
		return 'complex128'; // TODO: constants/math/default-complex-floating-point-dtype?
	default:
		throw new Error( format( 'invalid option. Unsupported policy for determining an output array data type. Option: `%s`.', policy ) );
	}
}
Resolves an output array data type.

@private
@param {string} xdtype - input array data type
@param {string} policy - policy determining an output array data type
@throws {Error} unsupported policy
@returns {string} output array data type