× 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 recollect that we used decimal values rather than floating point. Five
decimal positions is sufficient to resolve 1/32 (0.03125), the smallest
fraction we stored.

One issue with using integers is, how do you know your conversion
factor? Implying from your post that it is hard coded to 1/16. Or is
there another field storing the conversion factor?

Integer inches = 5
Integer fractional = 3
Integer conversion = 16

5 + (3 / 16) = 5.1875

Interesting stuff.

--Loyd

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of McKown, John
Sent: Friday, December 12, 2008 10:07 AM
To: Midrange Systems Technical Discussion
Subject: RE: storing fractions of inches in a data field


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of
lgoodbar@xxxxxxxxxxxxxx
Sent: Friday, December 12, 2008 10:00 AM
To: midrange-l@xxxxxxxxxxxx
Subject: RE: storing fractions of inches in a data field

Doing some dBase programming in the early '90s, I wrote a generic
routine to convert decimal values to fractions and vice versa for some
stock program. Storing stock values has the same issues as storing
English measurements.

--Loyd

Personal opinion: I think that storing an integer which represents
1/16th of an inch is better than using floating point with decimal
places.

--
John McKown
Systems Engineer IV
IT



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.