Remove hint.html and index.html

As per discussions on GitHub the index.html and hint.html files should
be deleted in favour of README.md files (from any
.text/.txt/.markdown/.md files which will be turned into README.md in an
upcoming commit).
This commit is contained in:
Cody Boone Ferguson committed 2023-02-08 05:07:05 -08:00
1 parent ee8a36310f
commit 77fb0f11a2
143 files changed
-28606

No files matched your search

-121
View File
@@ -1,121 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="GENERATOR" content="mkd2html 2.1.5a DL=DISCOUNT">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<link rel="stylesheet"
type="text/css"
href="../hint.css">
<title>Most Well-rounded Hash</title>
</head>
<body>
<h1>Most Well-rounded Hash</h1>
<p>Qiming Hou <a href="&#109;&#x61;&#105;&#108;&#116;&#x6f;&#58;&#x68;&#x71;&#109;&#x30;&#x33;&#115;&#116;&#101;&#x72;&#64;&#103;&#x6d;&#97;&#105;&#108;&#x2e;&#99;&#111;&#x6d;">&#104;&#113;&#109;&#x30;&#x33;&#115;&#116;&#x65;&#114;&#64;&#103;&#x6d;&#x61;&#105;&#x6c;&#x2e;&#x63;&#x6f;&#x6d;</a><br>
<a href="http://www.houqiming.net/">http://www.houqiming.net/</a></p>
<h2>Judges' comments:</h2>
<h3>To use:</h3>
<pre><code>make
echo IOCCC | ./prog
</code></pre>
<h3>Try:</h3>
<pre><code>echo "" | ./prog
</code></pre>
<h3>Selected Judges Remarks:</h3>
<p>A good start for understanding this entry might be
https://www.ietf.org/rfc/rfc1321.txt. How does it compute this using only a
single looping construct? The original reference source code for this
algorithm is about 355 lines of code, yet this entry is only 199 lines with
one statement per line and it isn&rsquo;t using lots of macro expansion tricks like
the reference code!</p>
<p>Some things that make you go, &ldquo;huh?&rdquo;</p>
<pre><code>./prog &lt; prog.c | cut -c-5
./prog &lt; Makefile | cut -c-4
</code></pre>
<p>How are those values magically returned?</p>
<p>What happens with a large file? Something over 256K</p>
<pre><code>./prog &lt; large_file
</code></pre>
<p>Where does that message come from?</p>
<h2>Author&rsquo;s comments:</h2>
<p>This looks like a normal C program.</p>
<p>Almost everything is a double.</p>
<p>There are tell-tale signs like <code>pow(2,(?/12))</code> and <code>exp(-?*?)</code> (names redacted). You can also find a bunch of cosines and polynomial evaluations.</p>
<p>It looks like a ????? ???????????, right?</p>
<p>Run and find out.</p>
<h3>Why obfuscated</h3>
<p>Some poor scripting folks only have access to doubles (Jav?script, L?a, BA?IC, etc.).</p>
<p>As a C programmer, I feel obliged to show a gesture of sympathy, to experience their pain and provide an answer.</p>
<p>Except when absolutely necessary (<code>printf</code>, <code>int main()</code>, array indexing), there isn&rsquo;t a single integer. Even <code>getchar()</code> and <code>EOF</code> are immediately converted.</p>
<p>Since <code>bool</code> counts as an integer type too, there is no boolean either. No comparison, no <code>if</code>, no <code>?:</code>, no <code>||</code> <code>&amp;&amp;</code>. Everything is done in a single loop that terminates on printf. Straight up arithmetic.</p>
<p><code>floor</code> and <code>ceil</code> are technically double-to-double functions, but they feel like cheating. Yes <code>cos</code>, no <code>floor</code>.</p>
<h3>Limitations</h3>
<p>Hard requirements:</p>
<ul>
<li><p>The platform must implement the <code>double</code> type as IEEE754-compliant 64-bit floating point numbers. The 80-bit intermediate format used by x87 is considered as an violation of this. The code should print an error message on such platforms.</p></li>
<li><p>The program must start with the CPU / FPU in round-to-nearest mode.</p></li>
</ul>
<p>Soft requirements:</p>
<ul>
<li><p>The compiler must respect <code>volatile</code>. The code is formatted to warn about that, though.</p></li>
<li><p>The printed result is only correct on little-endian machines. The program takes care to warn about this issue after printing an incorrect big-endian result. Error messages become garbled, though.</p></li>
</ul>
<p>Tested platforms:</p>
<ul>
<li>Linux 3.18.7, Rasperberry Pi 2, clang 3.0-6.2, (works)</li>
<li>Linux 3.18.7, Rasperberry Pi 2, gcc 4.6.3, (works)</li>
<li>Mac OS X 10, x64, Apple LLVM version 6.1.0 (clang-602.0.53), (works)</li>
<li>Windows 8.1, x86, MSVC 2012 (works)</li>
<li>Windows 8.1, x64, MSVC 2012 (works)</li>
<li>Windows 8.1, x86, MinGW gcc 4.6.2 (fails, prints error message)</li>
<li>Windows 8.1, x86, MinGW gcc 4.6.2 with -msse2 -mfpmath=sse (works)</li>
</ul>
<hr />
<TABLE><TR>
<TD><a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/88x31.png" /></a></TD>
<TD><P>&copy; Copyright 1984-2016,
<A HREF="/judges.html">Leo Broukhis, Simon Cooper, Landon Curt Noll</A>
- All rights reserved<BR>
This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.</P></TD>
<TD>&nbsp;<!--<a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01 Transitional" height="31" width="88"></a>--></TD>
</TR></TABLE>
</body>
</html>