Suspiciously precise floats, or, how I got Claude's real limits

14 days ago (she-llac.com)

Neat analysis.

Although noticing the repeated pattern of a multiple of 9 in the fraction 0.16327272727272726 naturally suggests multiplying by 11, and then we get the much simpler value 1.796, at which point it's much easier to continue. I wouldn't have broken out a general analysis method for this, although it's neat to know that they exist.

  • I think the standard way to convert repeating decimals or decimals that appear to have a certain repeating pattern to fractions is to take the first repeating period and divide by 0.999.. with the number of 9s matching the period length. 0.163272727.. = 0.163+0.00027/0.99 = 163/1000+27/99000 = 449/2750

    • (This works because x/9 = 0.xxxx..., xy/99 = 0.xyxyxy... and so on). And that is true intuitively because when you long divide in order to get a repeating pattern you need the remainder to be the same as what you started with. I.e if you long divide

             0.n
            -----
          a| b.0
      

      You need 10b - an = b which implies 9b = an. If a = 9 (i.e. your divisor is of the form 10^n - 1, then b=n and you not only have a repeating pattern but you repeat digits.

      Or going the other way, if d = 10^n - 1 then [10 a = a (mod d)] so your remainders never change. And then note that

        a * 10^n = a * (10^n - 1) + a
      

      so your quotient is just `a` as well.

  • > naturally suggests multiplying by 11

    Is this a named concept that I can learn about?