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


  • Subject: RE: Entry Parameters
  • From: boldt@xxxxxxxxxx
  • Date: Fri, 21 Jan 2000 09:58:10 -0500



Alan wrote:
>Not to argue here. Maybe Hans could give use the true run down but all my
>understanding in 20 years of technical journals and performance tips says
>that the AS/400 is a packed decimal machine, the only one in the world. I
>believe that this has been extended to allow efficient other types (Like
>integer) but the native format of an AS/400 is packed decimal to the point
>where the math is done in a base 10 format(for absolute precision), not
base
>2(Binary). In other words, the AS/400 is business data processing machine,
>not a scientific machine. If you have ever had to work on a machine that
>uses floating point number to represent decimal values and all the
problems
>inherent in that, you know what I mean. We are really spoiled on the
AS/400
>because we never have these kind of problems.
>
>Everything I have read says the AS/400 takes a zoned value, converts it to
>packed decimal, does the arithmetic in Base 10 and then converts the
result
>back to zoned.

It's easy enough to verify.  Write an ILE RPG program
with all integer operands in an EVAL statement, say
"EVAL I = I + 1".  Time how long it takes compared
with the same EVAL with all packed operands.  You'll
find that integer performance in expressions works
much, much faster.  The AS/400 is a binary machine,
like all other computers.

On the other hand, in RPG III, all arithmetic is done
in packed decimal format.  But not because any hardware
ran decimal faster than binary, but to ensure that all
arithmetic worked the same regardless of internal
format.  One of the reasons we added integer and
unsigned datatypes to RPG IV was to give programmers
the option of having their arithmetic run as fast as
the machine allowed.

Cheers!  Hans

Hans Boldt, ILE RPG Development, IBM Toronto Lab, boldt@ca.ibm.com


+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.