From 79671ba3d419a4198d3d2283ba4ef694cb33ddb5 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Mon, 2 Jun 2014 02:44:35 -0400 Subject: [PATCH] Typo fix, clarify. --- _posts/2014-06-01-obfuscating-hello-world.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/_posts/2014-06-01-obfuscating-hello-world.md b/_posts/2014-06-01-obfuscating-hello-world.md index 60a3c7e..cfbfffe 100644 --- a/_posts/2014-06-01-obfuscating-hello-world.md +++ b/_posts/2014-06-01-obfuscating-hello-world.md @@ -498,7 +498,7 @@ doing I/O. The number can be decomposed in a variety of ways; no one method is correct (after all, we could just break it up into `(1 << 0) + (1 << 0) + ...`, but that's not interesting). We should have some substantial amount of nesting, but -still use most of ourt numerical variables. Obviously, doing this by hand isn't +still use most of our numerical variables. Obviously, doing this by hand isn't fun, so we'll come up with an algorithm. In pseudocode: {% highlight text %} @@ -547,7 +547,8 @@ Through trial and error, I found this equation to work well:
$$\mathit{span} = \lceil\log_{1.5} \lvert{\mathit{num}}\lvert\rceil + \lfloor2^{4-\mathit{depth}}\rfloor$$
-Translating the pseudocode into Python and making some tweaks, we get this: +Translating the pseudocode into Python and making some tweaks (support for the +`depth` argument, and some caveats involving negative numbers), we get this: {% highlight python %}