JMP에서 뱅크 라운딩하는 방법나는 최근에 은행원의 반올림에 대해 물었고 JMP 문서에서 아무 것도 찾지 못했습니다. 아래의 빠른 함수를 작성했지만 (공식 옵션은 물론), 1) JMP가 은행원의 반올림을 수행 할 수있는 방법이 있고 2) 내 / 다른 방법이 유용 할 수있는 경우에 궁금합니다. 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 )
);제목 : Re : 은행가 JMP에서 반올림하는 방법그것은보다 깨끗한 솔루션처럼 보입니다. 너무 나쁜 JMP는 이것을 canned rounding thing으로 가지고 있지 않습니다. 솔직하게 말하면, 다른 종류의 반올림이 있었는지 전혀 몰랐습니다 ... 표준? 반올림 
감사!제목 : Re : 은행가 JMP에서 반올림하는 방법그것은 내장되어 있지 않지만 나는 생각한다 이것은 동일한 일을 성취합니다 :
bankerRound = Function( {inputValue},
if( mod(inputValue, 0.5) == 0 & ! mod(inputValue, 1) == 0,
round(inputValue / 2) * 2,
round(inputValue)
)
);
tests = { 0,0.499,0.5,0.501,1,1.499,1.5,1.501,2,2.499,
2.5,2.501,3,3.499,3.5,3.501,-0.499,-0.5,-0.501,
-1,-1.499,-1.5,-1.501,-2,-3};
for( i = 1, i <= N items( tests ), i++,
Write( char( tests[i] ) || " -> " ||
char( bankerRound( tests[i] ) ) || "\!N" );
);제목 : Re : 은행가 JMP에서 반올림하는 방법Ok, 그것은 끔찍해 보였다. ... 다음 두 가지 공식 옵션을 사용해 보겠습니다.
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(); // place 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);
);