Implement high precision computation in Java reporting tool — RAQ Report

Last Post 04 Jul 2009 07:48 PM by freezea. 0 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
freezea
New Member
New Member

--
04 Jul 2009 07:48 PM
Background
For many reporting softwares, in order to accelerate operation speed, inputted decimal fractions will be set as double precision by default. However, in real business of web report, users sometimes need high precision computation of decimal fractions.

For example, in a financial report, when computing (5588.4 + 288.4)* 0.7, if we input “(5588.4 + 288.4)* 0.7? in the cell, the operation result of the reporting tool is 4113.75999, while the precise result is 4113.76.

How to solve it?

Solution
RAQ Report is a professional Java Web-based reporting tool. With the function decimal() of RAQ Report, it’s very easy to solve the problem. Users just need to write the expression: (decimal(’5588.4') +decimal(’288.4'))* decimal(’0.7') in the cell. Then, users can get the precise result.

This post is from freezea's blog. You are welcomed cc it anywhere, and please indicate the source.

If you would like to read more articles about reporting tool, you are also welcome to refer to my blog.


Acceptable Use Policy
---