× 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'll end this discussion, it's waste of time and fill only my inbox!
Because this situation can occur at any decimal place and you can't expect
from the system to round automatically in this case.
(It always cuts off the digits outside the given decimal places, regardless
of the value)

So in the given example:

result = %dech(x * (y / z) :7 :0); // 3 but should be 4 ->>> now it's
4!
result = %dech(x * y /z :7 :0); // 4

Just my 2cts.
Karl

-----Ursprüngliche Nachricht-----
Von: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxxxxxxxx] Im Auftrag von
Justin Taylor
Gesendet: Dienstag, 30. August 2022 20:03
An: rpg400-l@xxxxxxxxxxxxxxxxxx
Betreff: Re: Calculation gives wrong result

Here's the page I was looking at:
Precision of Intermediate Results
https://www.ibm.com/docs/en/i/7.3?topic=operations-precision-intermediate-re
sults#prectdf

date: Tue, 30 Aug 2022 08:46:13 +1000
from: Don Brown via RPG400-L <rpg400-l@xxxxxxxxxxxxxxxxxx>
subject: Re: Calculation gives wrong result

Hi Jon

Just curious for the intermediate calculation what precision is used ?
(Not that it would make much difference unless zero decimal places)

Cheers

Don



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.