Skip to Content
0
Former Member
Jun 27, 2008 at 03:12 PM

Multiplication by -1 rounds the value.

15 Views

Hi,

In message mapping i am using th NEG function to negative a all amounts. The problem is it rounds the amount,

eg.

212399.46 gets round to -212399.45

I tried the multiplication function as well and had written a JAVA function for the same all seems to give the same result.

after playing a lot with this issue i found that

The rounding of amounts is done only for amount with more than 5 digits before the decimals.

If the 1st decimal number is below 5 and the second is above 5. than the second decimal gets decremented by 1 e.g. 212399.46 gets round to 212399.45 exception to this is u201C.47u201D,u201D.48 u201C donu2019t know why

If the 1st decimal number is above 5 and the second is above 5. than the second decimal gets incremented by 1e.g 254398.76 gets round to 254398.77

Amounts in decimal number u201C.88u201D u201C.77u201D u201C.66u201D,never gets round of

Can any one help me with why it rounds values and provide a solution so that it does not rounds the value and pass amount just with negative sign without rounding.