function isSameValue( a, b ) {
	if ( a === b ) {
		if ( a === 0.0 ) {
			return 1.0 / a === 1.0 / b; // handles +-0
		}
		return true;
	}
	return ( a !== a && b !== b ); // handles NaNs
}
Tests if two double-precision floating-point numbers are the same value.

## Notes

-   The function implements the [SameValue Algorithm][ecma-262-same-value-algorithm], as specified in ECMAScript 5.
-   In contrast to the strict equality operator `===`, `-0` and `+0` are distinguishable and `NaNs` are the same.

[ecma-262-same-value-algorithm]: http://ecma-international.org/ecma-262/5.1/#sec-9.12

@param {number} a - first input value
@param {number} b - second input value
@returns {boolean} boolean indicating whether two double-precision floating-point numbers are the same value

@example
var bool = isSameValue( 3.14, 3.14 );
// returns true

@example
var bool = isSameValue( -0.0, -0.0 );
// returns true

@example
var bool = isSameValue( -0.0, 0.0 );
// returns false

@example
var bool = isSameValue( NaN, NaN );
// returns true