I was recently asked about banker's rounding and didn't find anything in the JMP documentation. I wrote the quick function below (as well as a formula option), but was curious if 1) JMP has a canned method for doing banker's rounding and 2) what other/better methods may be useful vs. mine. http://wiki.c2.com/?BankersRounding
bankerRound = Function( {inputValue},
{inputValue, fDiff, cDiff, modX, bankRound},
fDiff = inputValue - Floor( inputValue );
cDiff = Ceiling( inputValue ) - inputValue;
modX = Modulo( Round( inputValue, 0 ), 2 );
If(
cDiff == fDiff & modX == 0, bankRound = Ceiling( inputValue ),
cDiff == fDiff & modX != 0, bankRound = Floor( inputValue ),
bankRound = Round( inputValue, 0 )
);
Return( bankRound );
);
inputValue = Empty(); // put column name here
fDiff = inputValue - Floor( inputValue );
cDiff = Ceiling( inputValue ) - inputValue;
modX = Modulo( Round( inputValue, 0 ), 2 );
If(
cDiff == fDiff & modX == 0, bankRound = Ceiling( inputValue ),
cDiff == fDiff & modX != 0, bankRound = Floor( inputValue ),
bankRound = Round( inputValue, 0 )
);
... View more