public static function divide_equal( $d1, $d2, &$types, &$namespaces )
	{
		if ( is_null( $d1 ) && is_null( $d2 ) ) return true;
		if ( is_null( $d1 ) || is_null( $d2 ) ) return false;

		// Check the arrays have the same elements
		$result = XBRL_Equality::matchedKeyNames( $d1, $d2, array( 'denominator', 'numerator' ) );

		// if ( $result === false || ! is_array( $result ) || ! count( $result ) ) return false;
		if ( $result === false || ! is_array( $result ) ) return false;
		if ( ! count( $result ) ) return true;

		foreach ( $result as $elementName )
		{
			switch ( $elementName )
			{
				case 'denominator':

					if ( ! XBRL_Equality::measures_equal( $d1['denominator'], $d2['denominator'], $types, $namespaces ) )
					{
						return false;
					}

					break;

				case 'numerator':

					if ( ! XBRL_Equality::measures_equal( $d1['numerator'], $d2['numerator'], $types, $namespaces ) )
					{
						return false;
					}

					break;
			}
		}

		return true;
	}