Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!think.com!snorkelwacker.mit.edu!stanford.edu!msi.umn.edu!noc.MR.NET!gacvx2.gac.edu!hhdist From: HCLIMER%UTCVM.BITNET@CUNYVM.CUNY.EDU (Harold Climer) Newsgroups: comp.sys.handhelds Subject: RE: HP 48 Yards.FeetInches Message-ID: Date: 14 Jun 91 15:36:47 GMT Lines: 71 Return-path: <@CUNYVM.CUNY.EDU:HCLIMER@UTCVM.BITNET> In-reply-to: Your message of Fri, 14 Jun 1991 09:26 CST To: handhelds@gac.edu On Fri, 14 Jun 1991 09:26 CST you said: >Relay-Version: VMS News - V6.0-3 14/03/90 VAX/VMS V5.4; site gacvx2.gac.edu >Path: > gacvx2.gac.edu!noc.MR.NET!msi.umn.edu!umeecs!caen!zaphod.mps.ohio-state.edu! > >cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!princeton!phoenix.Princ > eton.EDU!woodhams >Newsgroups: comp.sys.handhelds >Subject: Re: HP 48 Yards.FeetInches >Message-ID: <10737@idunno.Princeton.EDU> >From: woodhams@phoenix.Princeton.EDU (Michael Woodhams) >Date: 13 Jun 91 23:56:15 GMT >Sender: news@idunno.Princeton.EDU >References: <2855ad7d:3432comp.sys.handhelds@hpcvbbs.UUCP> >Organization: Princeton University Observatory >Nntp-Posting-Host: phoenix.princeton.edu >Lines: 43 > >In article <2855ad7d:3432comp.sys.handhelds@hpcvbbs.UUCP> > akcs.joehorn@hpcvbbs.UUCP (Joseph K. Horn) writes: >>Any mathematicians out there? I need your help. >> >>All the code I've seen written to handle Feet.Inches pulls the number >>apart into its int and frac parts, handles them, and then recombines. >> >>But some years ago, this algorithm for Hours.MinSec was published: >> >> +-----------------------------------------+ >> | HMS->(x) = x + FP(x)/1.5 + FP(x*100)/90 | >> +-----------------------------------------+ >> >>The fact that it works mystifies me. My question is: If this kind of >>algorithm works for H.MS, can similar ones be created for any arbitrary >>fractional systems, like Yards.FeetInches? If so, how? > >HMS->(H.MMSS) = H.MMSS + 0.MMSS/1.5 + 0.SS/90 > = H + MM/100 + SS/10000 + MM/150 + SS/15000 + SS/9000 > = H + MM(1/100+1/150) + SS(1/10000+1/15000+1/9000) > = H + MM/60 + SS/3600 as required. > >The solution to the yards, feet, inches problem is obvious: use metrics. > >Let YFI->(Y.FII) convert yards.feet_inches to decimal yards, and >assume it is of the form > >YFI->(x) = x + FP(x)/a + FP(x*10)/b > >and solve for a and b: > >YFI->(Y.FII) = Y.FII + 0.FII/a + 0.II/b > = Y + F/10 + II/1000 + F/(10*a) + II/(1000*a) + II/(100*b) > = Y + F*(a+1)/(10*a) + II*(a*b+b+10*a)/(1000*a*b) > = Y + F/3 + II/36 >so (a+1)/(10*a) = 1/3 => a=3/7 >1/36 = (a*b+b+10*a)/(1000*a*b) > = (3*b/7+b+30/7)/(3000*b/7) > = (3*b+7*b+30)/(3000*b) > = (b+3)/(300*b) => b=9/22 >so >YFI->(x) = x + FP(x)*7/3 + FP(x*10)*22/9 > >The reverse transformation is left as an exercise for the student. Left as an exercise for the student. How I hate those words. I thought I would never see them here. I had enough of them when we used Keith R. Symon's "Mechanics" for Classical Mechanics at UTC (Physics by the way ). I also hate it should be obvious. It sure as hell wasn't always obvious to us.(Seemed like he always skipped 10 or 12 steps between the "obvious" parts.) Harold Climer Physics Department U. Tennessee at Chattanooga