TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Underscore Pi (2017)

85 pointsby PortableCodeabout 7 years ago

6 comments

igraviousabout 7 years ago
In all its glory:<p><pre><code> #define _ -F&lt;00||--F-OO--; int F=00,OO=00;main(){F_OO();printf(&quot;%1.3f\n&quot;,4.*-F&#x2F;OO&#x2F;OO);}F_OO() { _-_-_-_ _-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_ _-_-_-_ } </code></pre> Fierce! Unhinged! Cromulent! Kickass!
saagarjhaabout 7 years ago
Unfortunately, this doesn&#x27;t seem to work in Clang because it doesn&#x27;t support the -traditional-cpp flag. Make sure that you&#x27;re actually using GCC if you&#x27;re following along!
jerrreabout 7 years ago
&gt; What would happen if you make the circle in the code bigger?<p>More precision?
swalladgeabout 7 years ago
links to sources on ioccc.org: <a href="http:&#x2F;&#x2F;ioccc.org&#x2F;1988&#x2F;westley.c" rel="nofollow">http:&#x2F;&#x2F;ioccc.org&#x2F;1988&#x2F;westley.c</a> | <a href="http:&#x2F;&#x2F;ioccc.org&#x2F;1988&#x2F;westley.hint" rel="nofollow">http:&#x2F;&#x2F;ioccc.org&#x2F;1988&#x2F;westley.hint</a>
dangabout 7 years ago
We changed the title from &quot;Underscore Pi – when M_PI from math.h is too mainstream; IOCCC winning entry&quot;.<p>This is a fine HN submission, but please don&#x27;t rewrite titles to editorialize!<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;newsguidelines.html" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;newsguidelines.html</a>
评论 #16967022 未加载
quietbritishjimabout 7 years ago
M_PI is not part of the C standard (it is part of Posix) so the title is awkward.
评论 #16965041 未加载