6

So, forgive my ignorance, this isn't a troll just a question.

How are continued fractions related to modular arithmetic?

Take the following example:

70%32 = 6
70//32 = 2

which we can just represent as
6+(32*2)

Now, as a continued fraction, we would do

70/32 = 2 + 6/32
and repeating what we just did but for 6/32, as you would with a continued fraction.

Am I actually doing everything correctly here or am I missing something?

Comments
  • 2
    Maybe this enlightens
  • 6
    That's actually how you divide by hand. I still learnt this in elementary school.

    After the first whole number 2, you place the decimal point and multiply the 6 by 10, which is 60. Integer division by 32 is 1 (first digit after the decimal point), rest 28. Multiply by 10 for the second decimal digit, which is 280. Integer division by 32 is 8, rest 24. Multiplied by 10 is 240, integer divided by 32 is 7 rest 16. Multiplied by 10 is 160, divided by 32 is 5 without rest.

    Result is 2.1875.
  • 2
    Almost correct. Since you want a continuous fraction, you need to do what you are saying until:

    70/32 = 2 + 6/32 = 2 + 1/(32/6)

    and repeat for 32/6.
  • 1
    @Fast-Nop

    Was too busy fighting, and getting into trouble heh!

    Thank you all for the lesson and the clarification.

    @turbod yeah pretty much, I just didn't carry it through to the end, figured people would know what I meant, instead of wasting space with the full example.
Add Comment