function sinpx( x ) {
	var result;
	var dist;
	var sign;
	var fl;

	sign = 1;
	if ( x < 0.0 ) {
		x = -x;
	}
	fl = floor( x );
	if ( isOdd(fl) ) {
		fl += 1;
		dist = fl - x;
		sign = -sign;
	} else {
		dist = x - fl;
	}
	if ( dist > 0.5 ) {
		dist = 1.0 - dist;
	}
	result = sinpi( dist );
	return sign*x*result;
}
Calculates `x * sin(pi * x)`, taking extra care near when `x` is near a whole number.

@private
@param {number} x - input value
@returns {number} function value