The curse of the numbers below 473 and above 474...
The comparison in the function is needed (or some other code at least) else when it is compiled with -O1
,-O2
,-O3
option the code is substituted and the effect disappears.
The Wild Bunch
int MaxB=147;
B[]={15,27,30,37,54,60,67,71,74,108,117,119,120,134,139,142,148,161,191,205,216,221,225,229,234,237,238,239,240,253,268,278,284,296,315,322,382,407,410,417,431,432,439,441,442,443,445,449,450,458,465,468,474,475,476,477,478,480,481,487,501,505,506,527,536,551,556,563,567,568,592,593,630,641,644,743,751,764,775,791,801,814,820,829,834,857,861,862,864,867,878,879,882,884,886,890,898,900,903,905,907,915,916,923,925,927,929,930,936,947,948,950,952,954,955,956,957,960,962,967,971,974,975,983,1002,1010,1012,1017,1021,1027,1031,1054,1072,1102,1112,1126,1133,1134,1136,1181,1184,1186,1213,1249,1260,1279,1282}
Sadly, I don't have enough reputation to post, but I really wanted to post something. First off, this is probably invalid ;-; but here's my Brainf*** code, which sizes in at 63 bytes:
++++[>++++[>+++<-]<-]>>++.-------.+++++++.+++++++++++.--------.
– EnragedTanker – 2015-03-04T16:16:20.503I'm closing this question in compliance with our policy on underhanded challenges.
– Dennis – 2016-03-23T04:50:34.73348This is question in book "1984" by George Orwelll. – bacchusbeale – 2014-05-30T12:23:22.157
97Why is this underhanded? Two plus two is five. – Geobits – 2014-05-30T16:23:03.263
1http://www.youtube.com/watch?v=lstDdzedgcE – Flonk – 2014-05-30T16:29:07.177
79THERE! ARE! FOUR! LIGHTS! – Nick T – 2014-05-30T19:57:02.437
105
@Geobits - I agree: 2+2=5 you can see it in this calculator.
– MT0 – 2014-05-30T20:03:40.28047
echo "2+2=5";
– user3459110 – 2014-05-31T12:16:21.53734I always thought that
2 + 2 = 5
for very large values of 2. – devnull – 2014-06-01T02:55:47.4406
(1<<2)+(2>>1)
– gnibbler – 2014-06-01T13:53:42.4071Big Brother? NOT ROOM 101 :( – Max00355 – 2014-06-01T14:45:05.610
2Python: >>> 1 + 2e-60 + 2e-60 == 1+ 5e-60 True – Danra – 2014-06-01T20:28:34.110
2
To see discussions of this question and its answers: Reddit and Hacker News.
– None – 2014-06-02T02:28:47.5371C/C++
char flush[] = "\n \003"; printf("%d\n", 2 + 2 [flush]);
– Tony D – 2014-06-02T03:06:33.567#include <stdio.h>
int main(int argc, char** argv) {
char c = '2'; int a = (int)c; printf("%c+%c=%d\n", c, c, a/10)); return 0; } – Alex Reynolds – 2014-06-02T07:35:26.317
2(function () { var two = 2; console.log(two+++two); })(); – Growler – 2014-06-02T16:03:25.503
@MT0 I thought you were referring to this 100% accurate model
– iFreilicht – 2014-06-02T22:09:05.0931
In Swift: http://oi60.tinypic.com/blu8o.jpg
– janjarfalk – 2014-06-03T01:22:20.527Not enough reputation for a post, so C# alternative is here:
int x = 2, y = 2;
Action action = () => Console.WriteLine(x + y);
x++;
action();
. Not working in .Net 4.5+ – Alex Zhukovskiy – 2014-06-04T10:32:32.8271@MichaelT I can't believe my question made it to reddit, haha – qwr – 2014-06-05T05:17:57.443
1
int i = 2 + 2; Console.Write(++i);
C# – sangram parmar – 2014-06-06T08:19:13.337The teacher Jonofon Serates shows an way to do it mathematically https://www.youtube.com/watch?v=xanIFMTxKGs it is in Portuguese, anyway the math is the same in any language :D
– ademar111190 – 2014-06-06T15:37:00.7332Drat. I have a really short FORTRAN answer that actually happened to me once, but not enough reputation to add it. – DJClayworth – 2014-06-08T19:54:01.563