ROUND results using Comet16 vs Comet32


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]

Posted by Robert G Laurin on May 12, 2015 at 12:21:01:

Just found out that Comet32 calculates differently than what we'd expect and always knew for Comet16.

My understanding of the rounding in calculation, has always been that all calculations were as precise as the most precise variable. The ROUND statement would allow me to round the result when moving it to my rounded variable.

So if I multiply & divide using a 8.2 and some integers, my intermediate result will be 8.2.

Example:

Amount=795 as 8.2
NoMo=3 as 3.0
Period=22 as 3.0
and Result as 8.2 ROUNDed

so

Result = Amount * NoMO / Period
108.40 = 795.00 * 3 / 22

Intermediate result (108.4090909090) is chopped at 2 decimals = 108.40 and is not rounded going into Result.

If I really want to round this, I would say:

Result = Amount * NoMO * 1.0000 / Period

Intermediate result would be 4 decimals = 108.4090 before moving into Result and thus would be rounded as 108.41

This has been working for ever.

In Comet32 the result is rounded (108.41) even if the most decimals is 2. This happens ONLY if RESULT is ROUNDed.

I wonder if the division is not the culprit....

In any case, it is a different behavior.


Tested with Comet32 2014.491 and Comet16 2012.472


Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

What is the name of the main Signature System's Product?  

Comments:

Optional Link URL:
Link Title:
Optional Image URL:

You may attach up to 5 files to your followup (see below):





Each file can be a maximum of 1MB in length Uploaded files will be purged from the server on a regular basis.


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]