That's why I wonder at the wisdom of whoever designed the DB in
question. R2's as LINE NUMBERS?! (The same concept as Line Numbers you
would see in a P.O. or S.O.) What where they thinking?
Tracy Johnson
Office 1-757-766-4318
[log in to unmask]
> -----Original Message-----
> From: HP-3000 Systems Discussion
> [mailto:[log in to unmask]] On Behalf Of John Pitman
> Sent: Monday, January 11, 2010 3:54 PM
> To: [log in to unmask]
> Subject: Re: [HP3000-L] R2 and REALs, What Do They Call it When ...?
>
> Fractions in float can ONLY represent numbers accurately and
> exactly when the fraction is a negative power of 2, or a sum
> of such values. Eg where 2**-1= 0.5, 2**-2 = 0.25 and so on.
> You have 2 choices here - limit the output of 1.04004 to 2
> decimal places (when it will always show the correct value),
> or Multiply by 100 and chop off the last 2 digits to get what
> you want.
> We still have some 25 year old apps using R2 and R4 data,
> but we store all money values as cents, accumulate them as
> cents and only when actually displaying or printing them do
> we insert the decimal point....and we NEVER have any issues.
>
> Regards,
>
> John Pitman
> -----Original Message-----
> From: HP-3000 Systems Discussion
> [mailto:[log in to unmask]] On Behalf Of Johnson, Tracy
> Sent: Tuesday, 12 January 2010 2:09 AM
> To: [log in to unmask]
> Subject: [HP3000-L] R2 and REALs, What Do They Call it When ...?
>
> We ran into a situation, one that we can deal with, but I'm curious to
> know the name of this phenomenon:
>
> We have an R2 in a Turbo/IMAGE database. The programmer,
> many eons ago,
> (in his infinite) wisdom chose R2 to represent line numbers for Sales
> Order instructions. The progression of line numbers ALWAYS are
> incremented by a 100th. 1.01, 1.02, 1.03, 1.04 etc.
>
> Years later an ODBC script is "generated" and the data is downloaded
> into SQL on a PC to a "REAL" number field. In SQL, the data sometimes
> (not always) appears with extra digits. Some examples below:
>
> 1.04 appears as 1.04004
> 1.05 appears as 1.05005
> 1.06 appears as 1.06006
> 1.07 appears as 1.06995
> 1.08 appears as 1.07996
> 1.09 appears as 1.08997.
>
> And like I said, it is not consistent, sometimes the data appears
> correctly.
>
> What's the name for this phenomenon?
>
> Tracy Johnson
> Business Analyst
> Measurement Specialties, Inc.
> 1000 Lucas Way
> Hampton, VA 23666
> Office 1-757-766-4318
> [log in to unmask]
> www.meas-spec.com
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
>
> CAUTION: This message may contain privileged and confidential
> information intended only for the use of the addressee named
> above. If you are not the intended recipient of this message
> you are hereby notified that any use, dissemination,
> distribution or reproduction of this message is prohibited.
> If you have received this message in error please notify RYCO
> Hydraulics Pty. Ltd. immediately. Any views expressed in this
> message are those of the individual sender and may not
> necessarily reflect the views of RYCO Hydraulics Pty. Ltd.
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
>
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|