rounding in RAP is not correct
Hello,
I've a value (100%) -> 53,18
With a calc (type double, DisplayFormat #,0.00;-#,0.00) I try to get an
other value (2% of 53,18).
The corecct value is: 53,18*0,98=52,1164. After rounding the value
should be 52,12, but the calc shows 52,11...
I think it isn't correct. Is it?
What can I do to get the value 52,12? FormatFloat return 52,11 too...
Best regards,
Dmitri
I've a value (100%) -> 53,18
With a calc (type double, DisplayFormat #,0.00;-#,0.00) I try to get an
other value (2% of 53,18).
The corecct value is: 53,18*0,98=52,1164. After rounding the value
should be 52,12, but the calc shows 52,11...
I think it isn't correct. Is it?
What can I do to get the value 52,12? FormatFloat return 52,11 too...
Best regards,
Dmitri
This discussion has been closed.
Comments
Which version of ReportBuilder are you using? In our testing setting the
value of a variable to 52.1164 with your display format below returned the
correct value of 52.12 for a double and currency type.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Hi Nico,
it was my mistake. The value 53.18 was a rounded value (display format).
The exactly value was 53,17768. 2% of 53,17768 are 52.1141264, which
results rounded 52.11.
Sorry for the false alarm :-)