Math package revisited

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Math package revisited

BJ Freeman
I would like to propose that we find or create a math package that
supports rounding only at the end process.
By this I mean follow the cobol way of making everything a integer.
there is a defined number of positions that are set as to the right of
the decimal.
all computations are done in long (big integers). When there is a print
out of final calculation, then the rounding is done.
This would be the most accurate, IMHO

Thoughts.
Reply | Threaded
Open this post in threaded view
|

Re: Math package revisited

David E Jones-2

Check out the BigDecimal stuff. A mailing list search should get you dozens of interesting (and hundreds of boring) messages.

This is a fixed point math library so that floating point issues are not an issue.

-David


BJ Freeman wrote:

> I would like to propose that we find or create a math package that
> supports rounding only at the end process.
> By this I mean follow the cobol way of making everything a integer.
> there is a defined number of positions that are set as to the right of
> the decimal.
> all computations are done in long (big integers). When there is a print
> out of final calculation, then the rounding is done.
> This would be the most accurate, IMHO
>
> Thoughts.

smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Math package revisited

BJ Freeman
I did, does not do what I proposed.
also does not address when to to calculate in integer move and when to
calculate to round answer.

also the rounding in ofbiz would only be done at the last calculation,
like in the the General Ledger, or final statement, not at the invoice
level.


David E. Jones sent the following on 7/15/2006 7:43 PM:

>
> Check out the BigDecimal stuff. A mailing list search should get you
> dozens of interesting (and hundreds of boring) messages.
>
> This is a fixed point math library so that floating point issues are not
> an issue.
>
> -David
>
>
> BJ Freeman wrote:
>> I would like to propose that we find or create a math package that
>> supports rounding only at the end process.
>> By this I mean follow the cobol way of making everything a integer.
>> there is a defined number of positions that are set as to the right of
>> the decimal.
>> all computations are done in long (big integers). When there is a
>> print out of final calculation, then the rounding is done.
>> This would be the most accurate, IMHO
>>
>> Thoughts.