|
> -----Original Message----- > From: Ray Peterson [mailto:rpeterso@witc.tec.wi.us] > Sent: Tuesday, October 05, 1999 8:51 PM > To: RPG400-L@midrange.com > Subject: Re: [Re: RPGILE V4.3 Gotcha] > > /* SNIP */ > ... "Since float variables are intended to represent > "scientific" values, a > numeric value stored in a float variable may not represent the exact > same value as it would in a packed variable. Float should not be used > when you need to represent numbers exactly to a specific number of > decimal places, such as monetary amounts." > > I'm trying to come up with a good example where FP would be > appropriate > in our environment, and I'm not seeing any. Perhaps someone else has > an example they would share! > In an acronym, ILE. Floating point numbers are the "normal" decimal number format in C (C on the 400 must support BCD, but I'm talking "regular" library functions.) If you look at the ILE math APIs you'll see all sorts of float parameters. Floats give you the chance to use APIs and things from other languages that you couldn't touch before. For a lot of business programming, you'll probably never use floating point numbers. I know I haven't except in playing around with them. It's nice to know that they're there. +--- | 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 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.