The real treasure was the numbers we made along the way












5












$begingroup$


Your task is to write a program, function or snippet (yes, snippets are allowed) that simply outputs an integer. However, you must be able to separate your submission into prefixes that also produce distinct integers. You cannot use any bytes that have appeared in previous prefixes. For example, we can have the prefixes:



1         # 1    (Now we can't use 1)
1-6 # -5 (Now we can't use - or 6)
1-6/3 # -1 (Now we can't use / or 3)
1-6/2+0xA # 9 Final submission


Rules




  • Your goal is to create to try and create the most unique integers, while keeping them close to zero.


    • The scoring system is ((number of unique integers)**3)/(sum of absolute values), where the higher your score, the better. The above example scores $(4^3)/(1+lvert-5rvert+lvert-1rvert+9) = 64/16 = 4$.



  • There should be at least two unique integers (no dividing by zero!)

  • Please format your answer similar to:


# Language, $(4^{3})/16 = 4$

1-6/2+0xA (the full program)



  • Mention if your submission is composed of snippets that evaluate to a value, functions or full programs.

  • List each of the prefixes and (optionally) an explanation for how they work.










share|improve this question









$endgroup$












  • $begingroup$
    Any chance we could reuse whitespace characters?
    $endgroup$
    – Shaggy
    1 hour ago










  • $begingroup$
    Can we look at out own code cheating-quine style, like with open(__file__) in Python?
    $endgroup$
    – xnor
    1 hour ago










  • $begingroup$
    The Final submission line appears to have swapped the 3 for a 2 (I haven't edited to correct this in case I've misunderstood)
    $endgroup$
    – trichoplax
    1 hour ago










  • $begingroup$
    It looks to me like you can get a near-optimal score in Python by writing print 123-len(open(__file__).read()) followed by # then one of each byte not used so far (except some control characters), with prefixes chopping those bytes. Adjust 123 to whatever centers the range of outputs around 0. For a better score, the non-comment part of the program can be rewritten using only the 7 distinct characters that are universal for Python. Is this all valid?
    $endgroup$
    – xnor
    1 hour ago








  • 1




    $begingroup$
    @JoKing I do include negatives, when the difference is negative.
    $endgroup$
    – xnor
    1 hour ago
















5












$begingroup$


Your task is to write a program, function or snippet (yes, snippets are allowed) that simply outputs an integer. However, you must be able to separate your submission into prefixes that also produce distinct integers. You cannot use any bytes that have appeared in previous prefixes. For example, we can have the prefixes:



1         # 1    (Now we can't use 1)
1-6 # -5 (Now we can't use - or 6)
1-6/3 # -1 (Now we can't use / or 3)
1-6/2+0xA # 9 Final submission


Rules




  • Your goal is to create to try and create the most unique integers, while keeping them close to zero.


    • The scoring system is ((number of unique integers)**3)/(sum of absolute values), where the higher your score, the better. The above example scores $(4^3)/(1+lvert-5rvert+lvert-1rvert+9) = 64/16 = 4$.



  • There should be at least two unique integers (no dividing by zero!)

  • Please format your answer similar to:


# Language, $(4^{3})/16 = 4$

1-6/2+0xA (the full program)



  • Mention if your submission is composed of snippets that evaluate to a value, functions or full programs.

  • List each of the prefixes and (optionally) an explanation for how they work.










share|improve this question









$endgroup$












  • $begingroup$
    Any chance we could reuse whitespace characters?
    $endgroup$
    – Shaggy
    1 hour ago










  • $begingroup$
    Can we look at out own code cheating-quine style, like with open(__file__) in Python?
    $endgroup$
    – xnor
    1 hour ago










  • $begingroup$
    The Final submission line appears to have swapped the 3 for a 2 (I haven't edited to correct this in case I've misunderstood)
    $endgroup$
    – trichoplax
    1 hour ago










  • $begingroup$
    It looks to me like you can get a near-optimal score in Python by writing print 123-len(open(__file__).read()) followed by # then one of each byte not used so far (except some control characters), with prefixes chopping those bytes. Adjust 123 to whatever centers the range of outputs around 0. For a better score, the non-comment part of the program can be rewritten using only the 7 distinct characters that are universal for Python. Is this all valid?
    $endgroup$
    – xnor
    1 hour ago








  • 1




    $begingroup$
    @JoKing I do include negatives, when the difference is negative.
    $endgroup$
    – xnor
    1 hour ago














5












5








5





$begingroup$


Your task is to write a program, function or snippet (yes, snippets are allowed) that simply outputs an integer. However, you must be able to separate your submission into prefixes that also produce distinct integers. You cannot use any bytes that have appeared in previous prefixes. For example, we can have the prefixes:



1         # 1    (Now we can't use 1)
1-6 # -5 (Now we can't use - or 6)
1-6/3 # -1 (Now we can't use / or 3)
1-6/2+0xA # 9 Final submission


Rules




  • Your goal is to create to try and create the most unique integers, while keeping them close to zero.


    • The scoring system is ((number of unique integers)**3)/(sum of absolute values), where the higher your score, the better. The above example scores $(4^3)/(1+lvert-5rvert+lvert-1rvert+9) = 64/16 = 4$.



  • There should be at least two unique integers (no dividing by zero!)

  • Please format your answer similar to:


# Language, $(4^{3})/16 = 4$

1-6/2+0xA (the full program)



  • Mention if your submission is composed of snippets that evaluate to a value, functions or full programs.

  • List each of the prefixes and (optionally) an explanation for how they work.










share|improve this question









$endgroup$




Your task is to write a program, function or snippet (yes, snippets are allowed) that simply outputs an integer. However, you must be able to separate your submission into prefixes that also produce distinct integers. You cannot use any bytes that have appeared in previous prefixes. For example, we can have the prefixes:



1         # 1    (Now we can't use 1)
1-6 # -5 (Now we can't use - or 6)
1-6/3 # -1 (Now we can't use / or 3)
1-6/2+0xA # 9 Final submission


Rules




  • Your goal is to create to try and create the most unique integers, while keeping them close to zero.


    • The scoring system is ((number of unique integers)**3)/(sum of absolute values), where the higher your score, the better. The above example scores $(4^3)/(1+lvert-5rvert+lvert-1rvert+9) = 64/16 = 4$.



  • There should be at least two unique integers (no dividing by zero!)

  • Please format your answer similar to:


# Language, $(4^{3})/16 = 4$

1-6/2+0xA (the full program)



  • Mention if your submission is composed of snippets that evaluate to a value, functions or full programs.

  • List each of the prefixes and (optionally) an explanation for how they work.







number code-challenge restricted-source






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 2 hours ago









Jo KingJo King

22.3k251115




22.3k251115












  • $begingroup$
    Any chance we could reuse whitespace characters?
    $endgroup$
    – Shaggy
    1 hour ago










  • $begingroup$
    Can we look at out own code cheating-quine style, like with open(__file__) in Python?
    $endgroup$
    – xnor
    1 hour ago










  • $begingroup$
    The Final submission line appears to have swapped the 3 for a 2 (I haven't edited to correct this in case I've misunderstood)
    $endgroup$
    – trichoplax
    1 hour ago










  • $begingroup$
    It looks to me like you can get a near-optimal score in Python by writing print 123-len(open(__file__).read()) followed by # then one of each byte not used so far (except some control characters), with prefixes chopping those bytes. Adjust 123 to whatever centers the range of outputs around 0. For a better score, the non-comment part of the program can be rewritten using only the 7 distinct characters that are universal for Python. Is this all valid?
    $endgroup$
    – xnor
    1 hour ago








  • 1




    $begingroup$
    @JoKing I do include negatives, when the difference is negative.
    $endgroup$
    – xnor
    1 hour ago


















  • $begingroup$
    Any chance we could reuse whitespace characters?
    $endgroup$
    – Shaggy
    1 hour ago










  • $begingroup$
    Can we look at out own code cheating-quine style, like with open(__file__) in Python?
    $endgroup$
    – xnor
    1 hour ago










  • $begingroup$
    The Final submission line appears to have swapped the 3 for a 2 (I haven't edited to correct this in case I've misunderstood)
    $endgroup$
    – trichoplax
    1 hour ago










  • $begingroup$
    It looks to me like you can get a near-optimal score in Python by writing print 123-len(open(__file__).read()) followed by # then one of each byte not used so far (except some control characters), with prefixes chopping those bytes. Adjust 123 to whatever centers the range of outputs around 0. For a better score, the non-comment part of the program can be rewritten using only the 7 distinct characters that are universal for Python. Is this all valid?
    $endgroup$
    – xnor
    1 hour ago








  • 1




    $begingroup$
    @JoKing I do include negatives, when the difference is negative.
    $endgroup$
    – xnor
    1 hour ago
















$begingroup$
Any chance we could reuse whitespace characters?
$endgroup$
– Shaggy
1 hour ago




$begingroup$
Any chance we could reuse whitespace characters?
$endgroup$
– Shaggy
1 hour ago












$begingroup$
Can we look at out own code cheating-quine style, like with open(__file__) in Python?
$endgroup$
– xnor
1 hour ago




$begingroup$
Can we look at out own code cheating-quine style, like with open(__file__) in Python?
$endgroup$
– xnor
1 hour ago












$begingroup$
The Final submission line appears to have swapped the 3 for a 2 (I haven't edited to correct this in case I've misunderstood)
$endgroup$
– trichoplax
1 hour ago




$begingroup$
The Final submission line appears to have swapped the 3 for a 2 (I haven't edited to correct this in case I've misunderstood)
$endgroup$
– trichoplax
1 hour ago












$begingroup$
It looks to me like you can get a near-optimal score in Python by writing print 123-len(open(__file__).read()) followed by # then one of each byte not used so far (except some control characters), with prefixes chopping those bytes. Adjust 123 to whatever centers the range of outputs around 0. For a better score, the non-comment part of the program can be rewritten using only the 7 distinct characters that are universal for Python. Is this all valid?
$endgroup$
– xnor
1 hour ago






$begingroup$
It looks to me like you can get a near-optimal score in Python by writing print 123-len(open(__file__).read()) followed by # then one of each byte not used so far (except some control characters), with prefixes chopping those bytes. Adjust 123 to whatever centers the range of outputs around 0. For a better score, the non-comment part of the program can be rewritten using only the 7 distinct characters that are universal for Python. Is this all valid?
$endgroup$
– xnor
1 hour ago






1




1




$begingroup$
@JoKing I do include negatives, when the difference is negative.
$endgroup$
– xnor
1 hour ago




$begingroup$
@JoKing I do include negatives, when the difference is negative.
$endgroup$
– xnor
1 hour ago










4 Answers
4






active

oldest

votes


















3












$begingroup$

vim, 14³ / 53 = 51.77



i10<esc>X<c-x>r2hx<c-a>Pa<del>4<c-c>d^s5<c-o>I-<c-o>$<c-o>C6<c-h>7


Try it online! (all prefixes)



Breakdown:



i1                  1
0 10
<esc>X 0
<c-x> -1 <c-x> decrements
r2 -2
hx 2 hx is X, but we've already used that
<c-a> 3 <c-a> increments
P -3 paste the - from two steps ago
a<del>4 -4
<c-c>d^ 4 <c-c> is an <esc> alternative
s5 5
<c-o>I-<c-o>$<c-o> -5 <c-o> allows a single normal mode input
C6 -6 trailing <c-o> from previous line used here
<c-h>7 -7 <c-h> = backspace





share|improve this answer











$endgroup$





















    1












    $begingroup$

    Python 3, $(6^{3})/12 = 18$



    0x1-2+3|True*~4


    This is a snippet.



    The individual prefix snippets are:



    0          # gives 0

    0x1 # gives 1 (hex syntax)

    0x1-2 # gives -1 (1 minus 2)

    0x1-2+3 # gives 2 (-1 plus 3)

    0x1-2+3|True # gives 3 (True == 1; 2 bitwise-OR 1 == 3)

    0x1-2+3|True*~4 # gives -5 (~4 == -5; True*~4 == -5; 2|-5 == -5)


    Python's bitwise operators treat negative integers as two's complement with unlimited 1s to the right, so -5 is treated as ...11111011, which when ORed with ...000010 gives ...11111011 unchanged.






    share|improve this answer









    $endgroup$





















      1












      $begingroup$

      Python 2, $11^3/53 = 25.1132075472$



      015-8*2+6/3&9%7ifelse 4^ord('b')


      Prefixes:



      0                                   # 0

      01 # 1

      015 # 13 (octal)

      015-8 # 5

      015-8*2 # -3

      015-8*2+6 # 3

      015-8*2+6/3 # -1

      015-8*2+6/3&9 # 9 (-1 bitwise-AND 9 = 9)

      015-8*2+6/3&9%7 # 2

      015-8*2+6/3&9%7ifelse 4 # 4

      015-8*2+6/3&9%7ifelse 4^ord('b') # 12 (4 bitwise-XOR 8 -- OR would also work)


      Not optimal, but the best I could personally find with this particular structure.






      share|improve this answer









      $endgroup$





















        0












        $begingroup$

        TI-BASIC (TI-84+ CE), $239^3/14344 = 951.75$



        111-length("+×-/ABCDEFGHIJK...


        The 256 bytes in TI-BASIC break down thusly:




        • 240 bytes are one-byte tokens that can be quoted

        • 11 are the start of two-byte tokens

        • 2 are unused

        • The remaining 3 are the ",, and newline characters which break strings.


        The string contains all 238 allowable bytes in the first category not already in 111-length(.



        The program calculates 239 distinct integers, ranging from 111 down to -127. The score is therefore $$ frac{239^3}{sum_{n = -127}^{111} |n|} = 951.7511.$$





        share









        $endgroup$













          Your Answer





          StackExchange.ifUsing("editor", function () {
          return StackExchange.using("mathjaxEditing", function () {
          StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
          StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["\$", "\$"]]);
          });
          });
          }, "mathjax-editing");

          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "200"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f179751%2fthe-real-treasure-was-the-numbers-we-made-along-the-way%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          4 Answers
          4






          active

          oldest

          votes








          4 Answers
          4






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          3












          $begingroup$

          vim, 14³ / 53 = 51.77



          i10<esc>X<c-x>r2hx<c-a>Pa<del>4<c-c>d^s5<c-o>I-<c-o>$<c-o>C6<c-h>7


          Try it online! (all prefixes)



          Breakdown:



          i1                  1
          0 10
          <esc>X 0
          <c-x> -1 <c-x> decrements
          r2 -2
          hx 2 hx is X, but we've already used that
          <c-a> 3 <c-a> increments
          P -3 paste the - from two steps ago
          a<del>4 -4
          <c-c>d^ 4 <c-c> is an <esc> alternative
          s5 5
          <c-o>I-<c-o>$<c-o> -5 <c-o> allows a single normal mode input
          C6 -6 trailing <c-o> from previous line used here
          <c-h>7 -7 <c-h> = backspace





          share|improve this answer











          $endgroup$


















            3












            $begingroup$

            vim, 14³ / 53 = 51.77



            i10<esc>X<c-x>r2hx<c-a>Pa<del>4<c-c>d^s5<c-o>I-<c-o>$<c-o>C6<c-h>7


            Try it online! (all prefixes)



            Breakdown:



            i1                  1
            0 10
            <esc>X 0
            <c-x> -1 <c-x> decrements
            r2 -2
            hx 2 hx is X, but we've already used that
            <c-a> 3 <c-a> increments
            P -3 paste the - from two steps ago
            a<del>4 -4
            <c-c>d^ 4 <c-c> is an <esc> alternative
            s5 5
            <c-o>I-<c-o>$<c-o> -5 <c-o> allows a single normal mode input
            C6 -6 trailing <c-o> from previous line used here
            <c-h>7 -7 <c-h> = backspace





            share|improve this answer











            $endgroup$
















              3












              3








              3





              $begingroup$

              vim, 14³ / 53 = 51.77



              i10<esc>X<c-x>r2hx<c-a>Pa<del>4<c-c>d^s5<c-o>I-<c-o>$<c-o>C6<c-h>7


              Try it online! (all prefixes)



              Breakdown:



              i1                  1
              0 10
              <esc>X 0
              <c-x> -1 <c-x> decrements
              r2 -2
              hx 2 hx is X, but we've already used that
              <c-a> 3 <c-a> increments
              P -3 paste the - from two steps ago
              a<del>4 -4
              <c-c>d^ 4 <c-c> is an <esc> alternative
              s5 5
              <c-o>I-<c-o>$<c-o> -5 <c-o> allows a single normal mode input
              C6 -6 trailing <c-o> from previous line used here
              <c-h>7 -7 <c-h> = backspace





              share|improve this answer











              $endgroup$



              vim, 14³ / 53 = 51.77



              i10<esc>X<c-x>r2hx<c-a>Pa<del>4<c-c>d^s5<c-o>I-<c-o>$<c-o>C6<c-h>7


              Try it online! (all prefixes)



              Breakdown:



              i1                  1
              0 10
              <esc>X 0
              <c-x> -1 <c-x> decrements
              r2 -2
              hx 2 hx is X, but we've already used that
              <c-a> 3 <c-a> increments
              P -3 paste the - from two steps ago
              a<del>4 -4
              <c-c>d^ 4 <c-c> is an <esc> alternative
              s5 5
              <c-o>I-<c-o>$<c-o> -5 <c-o> allows a single normal mode input
              C6 -6 trailing <c-o> from previous line used here
              <c-h>7 -7 <c-h> = backspace






              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited 24 mins ago

























              answered 39 mins ago









              DoorknobDoorknob

              54.5k17114348




              54.5k17114348























                  1












                  $begingroup$

                  Python 3, $(6^{3})/12 = 18$



                  0x1-2+3|True*~4


                  This is a snippet.



                  The individual prefix snippets are:



                  0          # gives 0

                  0x1 # gives 1 (hex syntax)

                  0x1-2 # gives -1 (1 minus 2)

                  0x1-2+3 # gives 2 (-1 plus 3)

                  0x1-2+3|True # gives 3 (True == 1; 2 bitwise-OR 1 == 3)

                  0x1-2+3|True*~4 # gives -5 (~4 == -5; True*~4 == -5; 2|-5 == -5)


                  Python's bitwise operators treat negative integers as two's complement with unlimited 1s to the right, so -5 is treated as ...11111011, which when ORed with ...000010 gives ...11111011 unchanged.






                  share|improve this answer









                  $endgroup$


















                    1












                    $begingroup$

                    Python 3, $(6^{3})/12 = 18$



                    0x1-2+3|True*~4


                    This is a snippet.



                    The individual prefix snippets are:



                    0          # gives 0

                    0x1 # gives 1 (hex syntax)

                    0x1-2 # gives -1 (1 minus 2)

                    0x1-2+3 # gives 2 (-1 plus 3)

                    0x1-2+3|True # gives 3 (True == 1; 2 bitwise-OR 1 == 3)

                    0x1-2+3|True*~4 # gives -5 (~4 == -5; True*~4 == -5; 2|-5 == -5)


                    Python's bitwise operators treat negative integers as two's complement with unlimited 1s to the right, so -5 is treated as ...11111011, which when ORed with ...000010 gives ...11111011 unchanged.






                    share|improve this answer









                    $endgroup$
















                      1












                      1








                      1





                      $begingroup$

                      Python 3, $(6^{3})/12 = 18$



                      0x1-2+3|True*~4


                      This is a snippet.



                      The individual prefix snippets are:



                      0          # gives 0

                      0x1 # gives 1 (hex syntax)

                      0x1-2 # gives -1 (1 minus 2)

                      0x1-2+3 # gives 2 (-1 plus 3)

                      0x1-2+3|True # gives 3 (True == 1; 2 bitwise-OR 1 == 3)

                      0x1-2+3|True*~4 # gives -5 (~4 == -5; True*~4 == -5; 2|-5 == -5)


                      Python's bitwise operators treat negative integers as two's complement with unlimited 1s to the right, so -5 is treated as ...11111011, which when ORed with ...000010 gives ...11111011 unchanged.






                      share|improve this answer









                      $endgroup$



                      Python 3, $(6^{3})/12 = 18$



                      0x1-2+3|True*~4


                      This is a snippet.



                      The individual prefix snippets are:



                      0          # gives 0

                      0x1 # gives 1 (hex syntax)

                      0x1-2 # gives -1 (1 minus 2)

                      0x1-2+3 # gives 2 (-1 plus 3)

                      0x1-2+3|True # gives 3 (True == 1; 2 bitwise-OR 1 == 3)

                      0x1-2+3|True*~4 # gives -5 (~4 == -5; True*~4 == -5; 2|-5 == -5)


                      Python's bitwise operators treat negative integers as two's complement with unlimited 1s to the right, so -5 is treated as ...11111011, which when ORed with ...000010 gives ...11111011 unchanged.







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered 1 hour ago









                      pizzapants184pizzapants184

                      2,674716




                      2,674716























                          1












                          $begingroup$

                          Python 2, $11^3/53 = 25.1132075472$



                          015-8*2+6/3&9%7ifelse 4^ord('b')


                          Prefixes:



                          0                                   # 0

                          01 # 1

                          015 # 13 (octal)

                          015-8 # 5

                          015-8*2 # -3

                          015-8*2+6 # 3

                          015-8*2+6/3 # -1

                          015-8*2+6/3&9 # 9 (-1 bitwise-AND 9 = 9)

                          015-8*2+6/3&9%7 # 2

                          015-8*2+6/3&9%7ifelse 4 # 4

                          015-8*2+6/3&9%7ifelse 4^ord('b') # 12 (4 bitwise-XOR 8 -- OR would also work)


                          Not optimal, but the best I could personally find with this particular structure.






                          share|improve this answer









                          $endgroup$


















                            1












                            $begingroup$

                            Python 2, $11^3/53 = 25.1132075472$



                            015-8*2+6/3&9%7ifelse 4^ord('b')


                            Prefixes:



                            0                                   # 0

                            01 # 1

                            015 # 13 (octal)

                            015-8 # 5

                            015-8*2 # -3

                            015-8*2+6 # 3

                            015-8*2+6/3 # -1

                            015-8*2+6/3&9 # 9 (-1 bitwise-AND 9 = 9)

                            015-8*2+6/3&9%7 # 2

                            015-8*2+6/3&9%7ifelse 4 # 4

                            015-8*2+6/3&9%7ifelse 4^ord('b') # 12 (4 bitwise-XOR 8 -- OR would also work)


                            Not optimal, but the best I could personally find with this particular structure.






                            share|improve this answer









                            $endgroup$
















                              1












                              1








                              1





                              $begingroup$

                              Python 2, $11^3/53 = 25.1132075472$



                              015-8*2+6/3&9%7ifelse 4^ord('b')


                              Prefixes:



                              0                                   # 0

                              01 # 1

                              015 # 13 (octal)

                              015-8 # 5

                              015-8*2 # -3

                              015-8*2+6 # 3

                              015-8*2+6/3 # -1

                              015-8*2+6/3&9 # 9 (-1 bitwise-AND 9 = 9)

                              015-8*2+6/3&9%7 # 2

                              015-8*2+6/3&9%7ifelse 4 # 4

                              015-8*2+6/3&9%7ifelse 4^ord('b') # 12 (4 bitwise-XOR 8 -- OR would also work)


                              Not optimal, but the best I could personally find with this particular structure.






                              share|improve this answer









                              $endgroup$



                              Python 2, $11^3/53 = 25.1132075472$



                              015-8*2+6/3&9%7ifelse 4^ord('b')


                              Prefixes:



                              0                                   # 0

                              01 # 1

                              015 # 13 (octal)

                              015-8 # 5

                              015-8*2 # -3

                              015-8*2+6 # 3

                              015-8*2+6/3 # -1

                              015-8*2+6/3&9 # 9 (-1 bitwise-AND 9 = 9)

                              015-8*2+6/3&9%7 # 2

                              015-8*2+6/3&9%7ifelse 4 # 4

                              015-8*2+6/3&9%7ifelse 4^ord('b') # 12 (4 bitwise-XOR 8 -- OR would also work)


                              Not optimal, but the best I could personally find with this particular structure.







                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered 41 mins ago









                              Aidan F. PierceAidan F. Pierce

                              823616




                              823616























                                  0












                                  $begingroup$

                                  TI-BASIC (TI-84+ CE), $239^3/14344 = 951.75$



                                  111-length("+×-/ABCDEFGHIJK...


                                  The 256 bytes in TI-BASIC break down thusly:




                                  • 240 bytes are one-byte tokens that can be quoted

                                  • 11 are the start of two-byte tokens

                                  • 2 are unused

                                  • The remaining 3 are the ",, and newline characters which break strings.


                                  The string contains all 238 allowable bytes in the first category not already in 111-length(.



                                  The program calculates 239 distinct integers, ranging from 111 down to -127. The score is therefore $$ frac{239^3}{sum_{n = -127}^{111} |n|} = 951.7511.$$





                                  share









                                  $endgroup$


















                                    0












                                    $begingroup$

                                    TI-BASIC (TI-84+ CE), $239^3/14344 = 951.75$



                                    111-length("+×-/ABCDEFGHIJK...


                                    The 256 bytes in TI-BASIC break down thusly:




                                    • 240 bytes are one-byte tokens that can be quoted

                                    • 11 are the start of two-byte tokens

                                    • 2 are unused

                                    • The remaining 3 are the ",, and newline characters which break strings.


                                    The string contains all 238 allowable bytes in the first category not already in 111-length(.



                                    The program calculates 239 distinct integers, ranging from 111 down to -127. The score is therefore $$ frac{239^3}{sum_{n = -127}^{111} |n|} = 951.7511.$$





                                    share









                                    $endgroup$
















                                      0












                                      0








                                      0





                                      $begingroup$

                                      TI-BASIC (TI-84+ CE), $239^3/14344 = 951.75$



                                      111-length("+×-/ABCDEFGHIJK...


                                      The 256 bytes in TI-BASIC break down thusly:




                                      • 240 bytes are one-byte tokens that can be quoted

                                      • 11 are the start of two-byte tokens

                                      • 2 are unused

                                      • The remaining 3 are the ",, and newline characters which break strings.


                                      The string contains all 238 allowable bytes in the first category not already in 111-length(.



                                      The program calculates 239 distinct integers, ranging from 111 down to -127. The score is therefore $$ frac{239^3}{sum_{n = -127}^{111} |n|} = 951.7511.$$





                                      share









                                      $endgroup$



                                      TI-BASIC (TI-84+ CE), $239^3/14344 = 951.75$



                                      111-length("+×-/ABCDEFGHIJK...


                                      The 256 bytes in TI-BASIC break down thusly:




                                      • 240 bytes are one-byte tokens that can be quoted

                                      • 11 are the start of two-byte tokens

                                      • 2 are unused

                                      • The remaining 3 are the ",, and newline characters which break strings.


                                      The string contains all 238 allowable bytes in the first category not already in 111-length(.



                                      The program calculates 239 distinct integers, ranging from 111 down to -127. The score is therefore $$ frac{239^3}{sum_{n = -127}^{111} |n|} = 951.7511.$$






                                      share











                                      share


                                      share










                                      answered 51 secs ago









                                      lirtosiastlirtosiast

                                      17.5k437108




                                      17.5k437108






























                                          draft saved

                                          draft discarded




















































                                          If this is an answer to a challenge…




                                          • …Be sure to follow the challenge specification. However, please refrain from exploiting obvious loopholes. Answers abusing any of the standard loopholes are considered invalid. If you think a specification is unclear or underspecified, comment on the question instead.


                                          • …Try to optimize your score. For instance, answers to code-golf challenges should attempt to be as short as possible. You can always include a readable version of the code in addition to the competitive one.
                                            Explanations of your answer make it more interesting to read and are very much encouraged.


                                          • …Include a short header which indicates the language(s) of your code and its score, as defined by the challenge.



                                          More generally…




                                          • …Please make sure to answer the question and provide sufficient detail.


                                          • …Avoid asking for help, clarification or responding to other answers (use comments instead).





                                          draft saved


                                          draft discarded














                                          StackExchange.ready(
                                          function () {
                                          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f179751%2fthe-real-treasure-was-the-numbers-we-made-along-the-way%23new-answer', 'question_page');
                                          }
                                          );

                                          Post as a guest















                                          Required, but never shown





















































                                          Required, but never shown














                                          Required, but never shown












                                          Required, but never shown







                                          Required, but never shown

































                                          Required, but never shown














                                          Required, but never shown












                                          Required, but never shown







                                          Required, but never shown







                                          Popular posts from this blog

                                          Ottavio Pratesi

                                          Tricia Helfer

                                          15 giugno