|
| -----Original Message----- | [mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Jon Paris | That has to be the answer, although I think you'll find it is a microcode | issue and not a runtime one as-such. Coding a test in C or Java should | confirm that it is not RPG related. | | It would be interesting to see if the same difference is noted on | a box that | has a hardware floating point unit - if indeed there are such | animals these | days. I was wondering, perhaps along similar lines, how the pSeries worked and what result would it calculate. I've *assumed* it had hardware-assisted numerics, but don't know about floating-point (nor enough about them a-tall). | -----Original Message----- | [mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Hans Boldt | What changed between releases? Why worry about it at all? The | difference is | in the part of the value past the 17 digit. Anything past that | point cannot | be trusted with double precision IEEE float format. Ever. That is, as far | as IEEE float is concerned, if two numbers differ starting at the 18th | digit, they pretty much represent the same number. The only possible | difference is that perhaps the algorithm used to format the number in | readable form has changed. The arithmetic involved almost | certainly did not | change. (You could verify that by looking at the float values in hex.) I think that'd be a Very interesting question, as you said "almost certain" it's in the display of the formatted number. | As a rough guideline, I'd simply recommend avoiding float numeric values | unless you know what you're doing. Perhaps a B (or better) grade | in senior | high school physics would be a good pre-req. ;-) Hans, I got an A in HS physics and read graduate level textbooks to do my final paper. I'm NOT stupid, but I'm guessing you know me well enough to know I do (and say) some of THE most outrageously STUPID things, anyway. (If I knew why I did some stupid things, I wouldn't...;-) ANYhoo... EXACTLY as Joe has recently posted, and from Scott: | However, I'm quite familiar with the limitations of floating point, I just | didn't know (until Rob or someone posted it) that the exponent operator in | ILE RPG outputs floating point. And some of us may HAVE actually known about this, at one time, and forgotten. But Hans, you have the advantage of being primarily concerned with these kinds of issues, day in and day out. Application programmers, I would say, generally think in terms of "I do some arithmetic, and it comes up with the right answer and then I'm gonna...". Until something weird crops up, and it strikes up a curiosity. (Speaking of which, Scott: WHY does DC display THAT many digits in the first place??...;-) So I'm disagreeing with what Joe said, in part, "Rremember, a lot of us dinosaurs don't have the benefit of a CS degree, since when we were coming up there was no such thing." I can't imagine many 400 programmers don't have the equivalent in work experience. And I'm amazed how much coding (though not RPG) that teachers, and journalists and such can do. So not having a CS degree, but assuming a more general-business/social/etc. understanding, shouldn't preclude somebody from doing business applications, imo. And, notwithstanding what Buck posted, I'm not sure what is the value of LIMITING the 400's accuracy to floating-point arithmetic, in the first place, as it would appear that is also limiting the pSeries in the same way. You could, apparently, maintain backwards compatibility Very Easily. Obviously, I don't know the Expense involved in such-a conversion to all-decimal arithmetic. (May already Be essentially in place?) But I do know that a lot of this may depend on Rochester (and others?) and ToroLabs being on the nearly-same page. And the folks in Somers being on the nearly-same page, as well as that being the nearly-same page as Rochester. That's a LOTta pages!! Which is the difficulty in EVERY large organization, afaik.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.