Feet/FeetInchFraction Conversions (compact format)

10222018, 12:06 AM
(This post was last modified: 10232018 01:17 PM by Eddie W. Shore.)
Post: #1




Feet/FeetInchFraction Conversions (compact format)
The two functions presented on this blog entry are FIFT (feetinchessixteenth of inches to feet) and FTFI (feet to feetinchessixteenth of inches). The format of the feetinchessixteenth of inches are as follows:
FF: feet II: inches NN: sixteenth of an inch Example: 4.0107 > 4 feet 1 inch 7/16 Example: 5.1108 > 5 feet 11 inches 1/2 Example: 3.06142 > 3 feet 6 inches 14.2/16 There is no rounding or fraction simplification involved with this format. HP Prime Program FIFT: FF.IINN to Feet Code:
Examples: FIFT(6.111) returns 6.96875 (6 ft 11 in 10/16 > 6.96875 ft) FIFT(0.0808) returns 0.70833333333 (8 in 8/16 (8 in 1/2) > 0.70833333333 ft) HP Prime Program FTFI: Feet to FF.IINN Code:
Examples: FTFI(5.78125) returns 5.0906 (5.78125 ft > 5 ft 9 in 6/16 (5 ft 9 in 3/8)) FTFI(4.05) returns 4.00096 (4.05 ft > 4 ft 9.6/16 in) Link to blog post: https://edspi31415.blogspot.com/2018/10/...ction.html 

10232018, 04:48 PM
Post: #2




RE: Feet/FeetInchFraction Conversions (compact format)
It would be nice if both FTFI and FIFT can be combined as one, say feet()
Float 6.111 is very hard to know its meaning. 6.111 ft ? 6 ft 11 in 10/16 ? I propose use imaginary number to signal the difference, a signal for multiple units (ft, in, 16th) 6 + 1110 i = 6 ft 11 in 10/16 6.111 = 6.111 ft Example: what is 5.78125 ft + (6 ft 11 in 10/16) ? feet(5.78125 + 6 + 1110 i) => 12.75 ft feet(12.75) => 12 + 900 i (12 ft 9 in) 

11282018, 10:15 PM
Post: #3




RE: Feet/FeetInchFraction Conversions (compact format)
(10232018 04:48 PM)Albert Chan Wrote: Float 6.111 is very hard to know its meaning. 6.111 ft ? 6 ft 11 in 10/16 ? Another alternative. 

« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)