src/sap.ui.core/src/sap/ui/model/odata/ODataUtils.js
function decimalCompare(sValue1, sValue2) {
		var oDecimal1, oDecimal2, iResult;

		if (sValue1 === sValue2) {
			return 0;
		}
		oDecimal1 = parseDecimal(sValue1);
		oDecimal2 = parseDecimal(sValue2);
		if (!oDecimal1 || !oDecimal2) {
			return NaN;
		}
		if (oDecimal1.sign !== oDecimal2.sign) {
			return oDecimal1.sign > oDecimal2.sign ? 1 : -1;
		}
		// So they have the same sign.
		// If the number of integer digits equals, we can simply compare the strings
		iResult = simpleCompare(oDecimal1.integerLength, oDecimal2.integerLength)
			|| simpleCompare(oDecimal1.abs, oDecimal2.abs);
		return oDecimal1.sign * iResult;
	}
function decimalCompare(sValue1, sValue2) {
		var oDecimal1, oDecimal2, iResult;

		if (sValue1 === sValue2) {
			return 0;
		}
		oDecimal1 = parseDecimal(sValue1);
		oDecimal2 = parseDecimal(sValue2);
		if (!oDecimal1 || !oDecimal2) {
			return NaN;
		}
		if (oDecimal1.sign !== oDecimal2.sign) {
			return oDecimal1.sign > oDecimal2.sign ? 1 : -1;
		}
		// So they have the same sign.
		// If the number of integer digits equals, we can simply compare the strings
		iResult = simpleCompare(oDecimal1.integerLength, oDecimal2.integerLength)
			|| simpleCompare(oDecimal1.abs, oDecimal2.abs);
		return oDecimal1.sign * iResult;
	}
function decimalCompare ( sValue1 , sValue2 ) { var oDecimal1 , oDecimal2 , iResult ; if ( sValue1 === sValue2 ) { return 0 ; } oDecimal1 = parseDecimal ( sValue1 ) ; oDecimal2 = parseDecimal ( sValue2 ) ; if ( ! oDecimal1 || ! oDecimal2 ) { return NaN ; } if ( oDecimal1 . sign !== oDecimal2 . sign ) { return oDecimal1 . sign > oDecimal2 . sign ? 1 : - 1 ; } // So they have the same sign. // If the number of integer digits equals, we can simply compare the strings iResult = simpleCompare ( oDecimal1 . integerLength , oDecimal2 . integerLength ) || simpleCompare ( oDecimal1 . abs , oDecimal2 . abs ) ; return oDecimal1 . sign * iResult ; }
Compares two decimal values given as strings.

@param {string} sValue1
the first value to compare
@param {string} sValue2
the second value to compare
@return {int}
the result of the compare: <code>0</code> if the values are equal, <code>-1</code> if the
first value is smaller, <code>1</code> if the first value is larger, <code>NaN</code> if
they cannot be compared
Compares two decimal values given as strings .