× 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 don't get this: if you use integer, the result is correct, but if it's
packed or signed, it goes wrong.

Is the calculation (and intermediate result format) different if you start
from integer?

Peter Colpaert
iSeries Application Developer

Honda Europe NV
Langerbruggestraat 104
B-9000 GENT
Belgium
Peter.Colpaert@xxxxxxxxxxxx
Tel: +32 9 2501 334
Fax: +32 9 2501 231
----------
Real programmers don't document. If it was hard to write, it should be
hard to understand.
----------



Scott Klement <klemscot@xxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
19/02/2004 01:33
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
cc

Subject
Re: Strange result with exponents...







Hi Hans,

> What's happening here? It's simple, really. The exponentiation operator
> returns a float numeric value. When you're dealing with double precision
> IEEE float numeric, you're limited to about 16 digits of precision. Any
> digits past the 16th or 17th cannot be trusted. Period. (Note in the
values
> listed that the difference shows up in the 18th digit and beyond.)

Okay, that makes sense... but, then why did it work in V5R1?  And V4R5?
Why does it use 8F if all of the operands are 30p?
Is it documented somewhere than exponentiation always outputs float, no
matter what your operands are?






The information contained in this communication is confidential and may be 
legally privileged. It is intended solely for the use of the individual or the 
entity to whom it is addressed and others authorised to receive it. If you have 
received it by mistake, please let the sender know by e-mail reply and delete 
it from your system.
If you are not the intended recipient you are hereby notified that any 
disclosure, copying, distribution or taking any action in reliance of the 
contents of this information is strictly prohibited and may be unlawful.
Honda Europe NV is neither liable for the proper and complete transmission of 
the information contained in this communication nor for any delay in its 
receipt.

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.