Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can use the symbolic toolbox to compute with big integers.</p> <p>Here is some code I whipped up to plot the Tupper expression, inspired in part by <a href="http://ask.metafilter.com/56216/How-does-Tupper-turn-a-number-into-a-map" rel="noreferrer">this discussion over at metafilter</a>:</p> <pre><code>% use the symbolic toolbox to represent the big integer k k = sym(['960939379918958884971672962127852754715004339660129306651505519271702802395266424689642842174350' ... '718121267153782770623355993237280874144307891325963941337723487857735749823926629715517173716995' ... '165232890538221612403238855866184013235585136048828693337902491454229288667081096184496091705183' ... '454067827731551705405381627380967602565625016981482083418783163849115590225610003652351370343874' ... '461848378737238198224849863465033159410054974700593138339226497249461751545728366702369745461014' ... '655997933798537483143786841806593422227898388722980000748404719']); [x,y] = meshgrid(0:1:106, 0:1:16); % evaluate the tupper formula tupper = rem(floor(floor((y+k)/17) .* 2.^(-17*x - rem((y+k), 17))), 2); % convert from symbolic to Matlab's native double precision tupper = double(tupper); % display it! image(fliplr((1-tupper)*255)); colormap gray axis equal title('Tupper''s (not-so-)self-referential formula!'); set(gca, 'XTick', [], 'YTick', []); </code></pre> <p>And the results: <img src="https://i.stack.imgur.com/Kxfrf.png" alt="resulting Matlab figure"></p> <p>Note: there's not actually anything self-referential about the formula; by choosing a differential value of <code>k</code>, you could make it display any other image of the same size. It would be a lot more exciting if it were an actual quine!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload