AX2009 : Penny difference calculation method

HI Friends,

how AX calculate penny difference while posting?

I want to use this validation in my customization, so i want to refer the method used by AX.

Can any one suggest me , where is this method.

thanks