× 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.



Informal testing only, on an in-use system; i.e. clock times especially, may appear suspect. The full table was loaded into memory with SETOBJACC with plenty spare, just before each test.

The SQL for each test, the file layout, and the validation that rounding was as expected:

update qtemp.updtst set _outcome =_ <see result matrix>

Field Type Len Dec
ORIGINAL PACKED 19 2
EXPECTED PACKED 16 2
OUTCOME PACKED 16 2

select count(*) from qtemp.updtst
where outcome <> expected

A test for 1.25M rows, five immediate successive updates:
_clock_ _CPU_ _outcome = _
135.44 108.79 round(original / 1000, 2)
124.74 100.32 round(original * .001, 2)
127.82 98.91 original * .001 + .005 /* target P(x, 2) */

The following as above, but cast to target type explicitly:
_clock_ _CPU_ _outcome = _
118.83 96.02 decimal( round(original / 1000, 2), 16, 2)
111.38 88.84 decimal( round(original * .001, 2), 16, 2)
109.74 89.11 decimal( original * .001 + .005, 16, 2)

Regards, Chuck

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.