Make an almost quine I wanted to fool a friend by giving him a quine that almost worked, but became sloppier and sloppier.

Create a program that, when run, will output the program, but one character off. Either one character can be added, removed or both (one character changes). But only one character.

Your score will be (length of your program) / floor(sqrt(number of times the program almost quines)) (Where / 0 is infinity)

number of times the program almost quines is how many times your program runs while only changing one character in stdout. Your program may not accept input. It may also not print a program it has already printed.

You may also not add a character that you have previously added before, or remove a character from the same index. For example, if you have added 1 before, and you add 1 again, that's where the number of times the program almost quines stops. If you remove the first character, you may not remove the first character again. If you changed the third character into a 2, you may not add a 2 or remove the third character.
CJam, 0.000884

{_,6/[{64md}6*](124+\+'�f++`"1$~"}""1$~


Here, � denotes the unprintable character with code point 128. Try it online.

Idea

This approach appends all UCS characters (original specification) with code points between U+4000000 and U+7FFFFFFF to the initially empty string that follows the code block.

We choose UTF-8, which encodes each of these characters using a 6 byte string as follows:

1111110u₂     10vvvvvv₂     10wwwwww₂     10xxxxxx₂     10yyyyyy₂     10zzzzzz₂

252 + u       128 + vvvvvv  128 + wwwwww  128 + xxxxxx  128 + yyyyyy  128 + zzzzzz


Thus, we can encode the nth character in this range by computing its 6 least significant digits in base 64 and adding 252 to the most significant and 128 to the remaining ones.

Scoring

There are 2 ** 31 = 2,147,483,648 6 byte UTF-8 characters and the length of the original code is 39, so the score is 39 / floor(2 ** 15.5) = 39 / 46340 = 0.0008416055243849806.

How it works

{                                }""    e# Push the code block and an empty string.
                                    1$~ e# Execute a copy of the code block.
 _,                                     e# Push the length of the string.
   6/                                   e# Divide by 6 to get the number of chars.
      {64md}6*                          e# Perform modular division six times.
     [        ]                         e# Collect the results in an array.
               (124+\+                  e# Add 124 to the first element.
                      '�f+              e# Add 128 to all and cast each to Char.
                          +             e# Concatenate the strings.
                           `            e# Push a string representation.
                            "1$~"       e# Push '1$~' to complete the quine.