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



Well said, Andy.

I would note this, however, where you say "In areas where absolute precision
is required", this would be 99.999% or better of math required in business
applications.

I believe there's a benefit to RTFM, and knowing something about mantissas
and exponents and other "edge cases" in the vast variety of other areas of
programming, of course.  (You'd hafta read only 10% of what I've written,
and/or understand only 10% of what you've read, to interpret my views
otherwise, btw.)  But anything can be overdone.  How much time to expend
learning about the < .001% of practical uses of a language?  Well, that's a
matter of personal opinion, of course.  And depends on the environment you
work in.  (Most all real good programmers I know are
wannabe-real-good-systems-programmers, but few are.)

Programmers, as a general rule, are people who enjoy intellectual mastery of
a subject.  Ie, power of an intellectual flavor...  So the tendency would,
naturally, be to over-emphasize the benefits of learning "new" things, at
the expense of DOING things (old and new, as situation warrants) which are
productive **for* the business enterprise* that employs them.

But I can't agree more with the view that "...one of the tricks to
programming is knowing which time is which."  That would NOT be a matter of
opinion, but a matter of fact.  Just as one of the tricks of living
day-to-day.. (and programmers really don't have any unique insights in this
regard just by virtue of being programmers btw,) is knowing same.

--

(Btw, Andy, your example reminded me (very precisely and accurately...;-) of
"funny" story from the summer of '73 when I worked in a factory.  (I learned
to drive a forklift before I learned to drive a car, but I assume they
didn't know that!)  Was involved in an industrial accident that resulted in
some downtime (luckily non-fatal, and no injuries except to my pride).  No
time, and probably not the place anyhoo...)

| -----Original Message-----
| [mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Andy Holmer
| Sent: Monday, April 05, 2004 11:52 AM

| Not wanting to be the only member that didn't post on this one so here
| goes....
|
| > These two types of problems differ in your ability to know quantities
| > with absolute exactness.  It is easy to know how many fingers I have
| > (an exact
| > entity) but it is very hard to know precisely how much they weigh (an
| > inexact entity).  Decimal expressions are used for problems that match
| the
| > first type (most iSeries software falls into this category).  Floating
| > point expressions are used for problems of the second type.  Do not
| use
| > the wrong type of expressions for the wrong problem.
|
| There are two metrics of a measurement to consider when solving a
| problem.  Accuracy and precision.  Accuracy is how close my answer is to
| the correct answer.  If I added 1 + 1 and got 1.6, 2.4, 1.7, 2.3, 2.0
| and 1.9, my answer is relatively accurate--they all average to 2, but
| they lack precision.  If I get 1.5002, 1.4997, 1.5001, 1.5000 my answers
| are very precise, but they lack accuracy.  To get a true correct answer
| I need both accuracy and precision.  The problem lies in the fact that
| nobody wants to spend $1000 to get a ruler accurate to 10 decimal
| places, so we sacrifice one or the other.
|
| The place that nature and business applications really cross is in the
| quality control department.  Consider the engineer that specifies a
| piece of aluminum that is one inch square to hang 1000 pounds off of.
| The aluminum holds 1100 pounds per square inch.  If I hang 1000 pounds
| from it does it break?  No - at least not on the drawing board.
|
| Consider reality.  My aluminum was made by a tired factory worker on a
| Monday morning.  It is really only .99 x .98 (which is within my quality
| control specification).  Consider that 1100 pound figure, can it really
| hold 1100 pounds per square inch or just somewhere between 1050 and
| 1150, depending on the batch of aluminum?  Lastly, does that weight
| really weigh 1000 pounds or did they think that somewhere between 980
| and 1020 was good enough?  So now if I hang the weight, does it break?
| It broke  1 time out of 25 --- whoops.
|
| So, if I wrote a procedure in RPG that would do all that statistical
| math and you just passed it parameters, I would have two choices,
| declare all my variables really big (19,9P in RPG III) and pray for no
| overflow or use a float data type.  In areas where absolute precision is
| required (aka General Ledger), float data types are not a very good
| answer, but within other areas they are exactly what the doctor ordered.
| IMHO one of the tricks to programming is knowing which time is which.
|
| Andy
|
|
|
|
| _______________________________________________
| This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
| To post a message email: RPG400-L@xxxxxxxxxxxx
| To subscribe, unsubscribe, or change list options,
| visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
| or email: RPG400-L-request@xxxxxxxxxxxx
| Before posting, please take a moment to review the archives
| at http://archive.midrange.com/rpg400-l.
|
|



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.