× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I will note that if I simulate the situation for one group of records (one that has inconsistent rounding errors) in a spreadsheet (Apple "Numbers"), each of several variations produces different rounding errors, none of them matching what my program gets.

The existing program was last compiled in on 7/9/2020, while mine was most recently compiled yesterday. Both show "Created on V7R3M0, for V7R1M0, earliest release V7R1M0"; that seems to be the default on this box.

I don't think sharing any more code than I already have would accomplish anything, because of the nature of the problem. But I will note that the case I examined has 32 source records being processed, two of which have negative values for DIQTSH, and the inconsistency between my program and a "running total" variation in the spreadsheet first appears when the negative value first appears.

For what it's worth, the test case looks like this, comma delimited:
DIQSHP, K01108, AMOUNT
2.00000, 290.08302, 580.16604
4.00000, 90.52876, 362.11504
3.00000, 82.03229, 246.09687
3.00000, 111.95791, 335.87373
3.00000, 25.18865, 75.56595
1.00000, 290.08302, 290.08302
2.00000, 290.08302, 580.16604
4.00000, 90.52876, 362.11504
2.00000, 82.03229, 164.06458
3.00000, 139.32707, 417.98121
8.00000, 90.52876, 724.23008
2.00000, 111.95791, 223.91582
20.00000, 25.18865, 503.77300
-1.00000, 139.32707, -139.32707
-1.00000, 154.59064, -154.59064
1.00000, 8.12052, 8.12052
1.00000, 139.32707, 139.32707
1.00000, 424.29717, 424.29717
2.00000, 111.95791, 223.91582
5.00000, 82.03229, 410.16145
10.00000, 37.36943, 373.69430
32.00000, 90.52876, 2896.92032
2.00000, 8.12052, 16.24104
2.00000, 82.03229, 164.06458
2.00000, 139.32707, 278.65414
2.00000, 290.08302, 580.16604
3.00000, 111.95791, 335.87373
5.00000, 25.18865, 125.94325
8.00000, 90.52876, 724.23008
2.00000, 90.52876, 181.05752
3.00000, 25.18865, 75.56595
6.00000, 90.52876, 543.17256
15.00000, 25.18865, 377.82975

--
JHHL

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.