Another way to align the repetend: 1000 10*0.62424242424 624.242 6.24242 -/1000 10*0.62424242424 618 -/1000 10 990 618r990 103r165
NB. Programmatically: 13 : '%/x: (y*-/x),-/x' [: %/ [: x: (] * [: -/ [) , [: -/ [ 1000 10 ([: %/ [: x: (] * [: -/ [) , [: -/ [) 0.624242424 NB. Not enough digits for y? 2574998969r4124998350 1000 10 ([: %/ [: x: (] * [: -/ [) , [: -/ [) 0.6242424242424 103r165 100 10 ([: %/ [: x: (] * [: -/ [) , [: -/ [) 0.6242424242424 NB. Also works w/other x 103r165 On Wed, Jan 16, 2013 at 5:56 AM, Boyko Bantchev <[email protected]> wrote: > On 16 January 2013 08:57, Roger Hui <[email protected]> wrote: > > ... > > Let x=0.6242424 ... . Multiply x by 100 and subtract x, > > > > 100 x 62.4242424 ... > > x 0.6242424 ... > > ----- -------------- > > 99 x 61.8 > > > > So 99 x = 61.8. Divide both sides by 99 and you get x=61.8%99 . Simplify > > and you get x=103r165. > > I would prefer the following derivation: > > Let x = 0.6(24). > Multiply by 10 to isolate the repetend from the preceding part: > 10x = 6+0.(24). > Let y = 0.(24) (thus x = (6+y)/10), > then 100y-y = 24, i.e. y = 8/33. > Therefore x = (6+8/33)/10 = 103/165. > > This derivation is cleaner by treating explicitly the repetend, > referring to a 'canonical' repeated fraction, and by making more > easily obvious what the method is and why it works. > > Processing other fractions with the same repetend will share the > derivation of y. Consider: > > Let x = 0.635(24), then 1000x = 635+0.(24). > Let y = ... exactly the same as above ... > Therefore > x = (635+y)/1000 = (635+8/33)/1000 = 20963/33000. > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > -- Devon McCormick, CFA ^me^ at acm. org is my preferred e-mail ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
