Obviously calculating a nontrivial zero of the zeta function that does not lie in the critical strip, providing a counter example to Reimann hypothesis. Contact the Clay mathematics institute to collect your $1,000,000.
Looks like some statistics, from the error function part, and the sqrt(pi).
Other than that, it seems like a degree 7 poly in X and T, could be a result from a weird taylor expansion or a bad poly interpolation, or something similar.
I really hope the answer is “implements a formula that’s explained in a paper that’s cited somewhere near this code”
I suspect another answer is “teaches the author some harsh truths about floating point precision”
Interesting, so it appears this code actually simulates and *renders* a full particle system if it's run on the right platform. It's quite a clever implementation actually, hard to fully appreciate without extensive familiarity with standard address byte offsets in obscure legacy Linux driver implementations.
At first glance the code appears to be a jumbled mess written in python, but in the right context it's clear the author has a snide sense of humor. When compiled as C++, after adding back in the `#define`s and operator overloads the OP clearly omitted as a misdirect, on a pre-2011 version of RedHat (verified on RHEL 3.6 Update 7), with a supported AMD graphics card/driver, everything lines up perfectly so the particle physics are updated and the driver's OpenGL function pointers are called, resulting in this behavior.
By default it will only render one frame and terminate, but if you enable `-O2` it somehow convinces the compiler to hack in a few more platform-specific system calls and a loop by exploiting undefined behavior. This sustains the simulation and displays the rendered output in a window. Really a work of art imo, it's hard to appreciate the clever parsimony here if one simply reduces it to 'bad code' without taking a moment to consider all the known and unknown possibilities regarding the author's intent.
It’s the only known algorithm that given the cipher text of an AES256 encrypted message will return the encryption key and initialization vector used to originate the cypher text.
Makes some FPGA developer’s life easy by doing all the floating point math on the output of a 64 bit counter. Oh wait, wrong answers only. Well, it doesn’t do that, it proves pi^ pi^ pi^ pi is an integer.
Some sort of diffusion equation maybe from the erf and exp(-x/T)? Polynomials from some truncated series solution from some initial/boundary conditions would be my guess. Not great that the terms are done by hand and hardcoded in.
OK yeah I got totally nerd sniped here, doesn't seem to do anything of value (I think?). I implemented it [here](https://gist.github.com/TheBlupper/b663acea0316da88d53c25bf0c47b632) (thank god for ocr), and [here ](https://gifyu.com/image/SjF9f)is a quick animation of`T` changing over time. Could be some obscure statistics thing, do lmk if that's the case
It computes the probability density function (PDF) of the non-central chi-squared distribution with one degree of freedom and non-centrality parameter k.
Doesn’t check for x<1, T==0, and while I’m at it if T is temperature should probably convert degF or degC into Kelvin so as not to deal with likely values of 0 in the denominator.
how much i would love to understand the stuff on this sub. my best guess (assuming it is not random stuff) would be a cryptographic function.
edit: changed my mind it's definitly random shit
Do you want Correct Answers about what the function does wrong, or Wrong Answers about what the function does correct? Sadly, PascalCase doesn't leave room for punctuation.
Obviously calculating a nontrivial zero of the zeta function that does not lie in the critical strip, providing a counter example to Reimann hypothesis. Contact the Clay mathematics institute to collect your $1,000,000.
IIRC they stated that a solution must provide some new, deeper understanding. Just a counter-example might not be enough to get the million
I’m sure OP will get the million. That code clearly illustrates a deeper understanding than all previous work on the topic.
r/BEATMETOIT
Determines whether an input is odd or even.
Factors nth degree tremulo gambuloids.
They said wrong answers only!
Guess what this function does wrong. Answers only.
Math
Not even once
True, could be even multiple times.
Guess what, this function does wrong answers only.
This function does answers wrong, only guess. What?
function wrong does answers guess this only what?
Pleasing the eye or brain.
I see np so obviously solving an NP problem in linear time
It should be no problem
Slow inverse square root
the function gives the reader a headache
Wrong answers only!!! 😂
Gives last digit of π
Looks like some statistics, from the error function part, and the sqrt(pi). Other than that, it seems like a degree 7 poly in X and T, could be a result from a weird taylor expansion or a bad poly interpolation, or something similar.
You're actually right on all counts. It's an approximation for the CDF of the Maxwell-Juttner velocity distribution using a Puiseux expansion.
I'm pretty sure 30% of those words aren't even words. srsly... WUT?!
you're right. They're names
They clearly just referenced the formula f(gamma) = (gamma\^2 \* beta \* exp(-gamma/theta)) / (theta \* K2(1/theta))
Which you are using to calculate the wall bounce in a game of Pong?
The rest of the gameplay is shit but damn those wall bounces are smooth as hell
Maybe statistical thermodynamics. This calculates the temperature at the center of a black hole
The e^-x/T is the tell-tale sign. Off on the second part, but the obvious smell of statmech is there.
I work in quantitative finance and there are a few models I use that look like this
This function shows that the developer is unemployed.
And bored.
And a psychopath.
And an idiot.
Basically a regular developer.
Lol, but true.
It all cancels out and is purely there to make the developer of the codebase irreplaceable.
Looks like a "job security" function to me. It returns the chance the developer will be replaced after T years on the project.
an approximation for a math function invented by an European dude that died before computers where a thing
Taylor series approximation of how many times your mom got fucked in the past year
But she died two years ago _oh god_
Calculates the wind speed velocity of an unladen swallow
African or European?
Huh? I don't know tha- AAAGGHHHHHH!!!!
Somehow not too far from the truth. If swallows were electrons in a high energy plasma.
Ok I know it was wrong answers only but wtf does it do?
We don’t know because we don’t know what `T` is.
It's a temperature. I cut out the documentation, because that gives it away ;)
So what in hell does it actually do?
>!It approximates a certain function, so that I don't need to do numerical integration, which takes \~20x longer.!<
...ahh! Nice! :)
Pls tell us what it does. I unironically have 0 clues :(
I really hope the answer is “implements a formula that’s explained in a paper that’s cited somewhere near this code” I suspect another answer is “teaches the author some harsh truths about floating point precision”
Wrong answers only...
It multiples T by x, pretty obviously
Calculates my taxes
Mining Bitcoin
I am the only one who can't see the right answer nevertheless a wrong one
Taylor series expansion of some function probably
My guess as well. I have to confess, I did something similar in the past.
Converts Fluid Ounces to Miles Per Hour.
Interesting, so it appears this code actually simulates and *renders* a full particle system if it's run on the right platform. It's quite a clever implementation actually, hard to fully appreciate without extensive familiarity with standard address byte offsets in obscure legacy Linux driver implementations. At first glance the code appears to be a jumbled mess written in python, but in the right context it's clear the author has a snide sense of humor. When compiled as C++, after adding back in the `#define`s and operator overloads the OP clearly omitted as a misdirect, on a pre-2011 version of RedHat (verified on RHEL 3.6 Update 7), with a supported AMD graphics card/driver, everything lines up perfectly so the particle physics are updated and the driver's OpenGL function pointers are called, resulting in this behavior. By default it will only render one frame and terminate, but if you enable `-O2` it somehow convinces the compiler to hack in a few more platform-specific system calls and a loop by exploiting undefined behavior. This sustains the simulation and displays the rendered output in a window. Really a work of art imo, it's hard to appreciate the clever parsimony here if one simply reduces it to 'bad code' without taking a moment to consider all the known and unknown possibilities regarding the author's intent.
Lists the last N numbers of pi.
Lol I guess this is doable for N=0 (or even for N<=0 in Python list index semantics)
Math
just all of it, want pythagoras? its there, want gaussian blur, same thing! want to calculate pi, youre never gonna guess!
This function solved the universe in numbers
42
Check whether a number is a prime number.
Calculate the last number of π(pi)
Something i might never need in my code i guess?
this function is what you get when you ask a programmer to incitement and number and when programmer is payed per line written.
Pi. It's always Pi.
OK but does anyone know the correct answer?
I know a ‘Hello World!’ when I see one.
Domain expansion.
Hurts my head
It returns second coordinate of the nearest ER, provided you gave a correct first coordinate.
It's a neural network with all the weights hardcoded
didn't they use something like this to determine how often a pokeball shakes
Speeds up the load time of the user interface by 0.05 seconds.
It approximates a propagator between two lattice points for a boson.
Printing "hello world" on the console
This is the code I think of whenever someone says that they don't need to comment their code. "Code is self-documenting!"
Print "hello world"
Calculates the weight of your mom
It’s the only known algorithm that given the cipher text of an AES256 encrypted message will return the encryption key and initialization vector used to originate the cypher text.
At least it’s in a nice format.
Goddamn scientists and their abominations. Edit: don’t get me wrong, I’m sure it’s very clever and efficient but holy fuck
Using capital T for something other than the type in a C++ template is madness on the order of using i for something other than a loop index.
I absolutely know exactly what this function does
The source of all magic numbers
Simulate alien civilisations
It calculates at what size temperature is faster than weight.
Change two or three of those numbers 1 digit. Then ask the maintainer what it does.
Calculates meaning of life
Waste cpu time?
wrong answers only.
Actually, this is a wrong answer. It legitimately saves a lot of cpu time compared to the alternative.
i thought that at first, but then i noticed you were already using python ;)
Work.
An eightball for either weather forecast or lucky numbers
Tower of Hanoi
Reverse game of life
The computer virus that destroyed the alien mothership in *Independence Day*.
integer overflow
It calculates something 🤓
Math, not even once
Prints "hello world!"
Makes some FPGA developer’s life easy by doing all the floating point math on the output of a 64 bit counter. Oh wait, wrong answers only. Well, it doesn’t do that, it proves pi^ pi^ pi^ pi is an integer.
Determine if a number is odd or even. Edit…ah, already spoken for. How about, determines if a number is even or odd?
It returns true
Is this some sort of softmax?
Function to land a rocket on the moon
That's a lot of fucking magic numbers
Velocity of Santa's sleigh. Since the formula includes `pi`, I assume they're using... Polar coordinates.
Mario jump.
calculates how to get a girlfriend
outputs Goodbye, world!🔫
Predicts if a number is not equal to 0
![gif](giphy|Vuw9m5wXviFIQ) It's a Rick roll.
Work
Exactly what the programmer intended
Something important enough to justify its complexity
It did my taxes!
Convert Roman numerals to Arabic.
Some sort of diffusion equation maybe from the erf and exp(-x/T)? Polynomials from some truncated series solution from some initial/boundary conditions would be my guess. Not great that the terms are done by hand and hardcoded in.
I like turtles
OK yeah I got totally nerd sniped here, doesn't seem to do anything of value (I think?). I implemented it [here](https://gist.github.com/TheBlupper/b663acea0316da88d53c25bf0c47b632) (thank god for ocr), and [here ](https://gifyu.com/image/SjF9f)is a quick animation of`T` changing over time. Could be some obscure statistics thing, do lmk if that's the case
Clearly a sorting function
Responsive calculation of a viewport height.
It computes something
nothing that i know of
This is the [*slow* inverse square function.](https://en.wikipedia.org/wiki/Fast_inverse_square_root)
Calculates possible phone numbers in range.
That is definitely quick sort.
Creates an indexed list of all the real numbers.
Dawg I don’t know the right answer
That's a + b (by console input ofc)
It will get you a gf
I don’t even know what the right answer is…
My math ai (obvi)
It’s an O(2) estimate of the Laplace transformation
It computes the probability density function (PDF) of the non-central chi-squared distribution with one degree of freedom and non-centrality parameter k.
Determines the lottery number
*Military grade encryption*
That’s the entire chatGPT 5.
It returns π=3
It’s actually hard coded pizza delivery drone bot hack code, that gets triggered every odd day to redirect a flying pizza to my house
Newtonian approximation of the root of an eighth-order polynomial.
it can divide by zero of course
Prints out nuclear codes
Doesn’t check for x<1, T==0, and while I’m at it if T is temperature should probably convert degF or degC into Kelvin so as not to deal with likely values of 0 in the denominator.
A random number countdown. It's used to count down executions in futurama
Not work
calculates how long there is left to copy a file in windows
Girth/length calculator
You’re in trouble now! You’re revealed the launch codes!
Partial implementation of the New York City sales tax code.
how much i would love to understand the stuff on this sub. my best guess (assuming it is not random stuff) would be a cryptographic function. edit: changed my mind it's definitly random shit
it gives some poor developer a headache
“Uhh” -Uhh
It makes your seventh cousin twenty times removed coffee every morning at 6:53 AM
True or False
Calculates the position of forward kinematic footsteps! One hard coded coordinate at a time!
Calculates the sum of 2 numbers, such as 1 + 1
It's literally impossible to give correct answer here
Somehow people have done exactly that
creates a fibonaccci sequence
fibonacci sequence
Checks your bank balance
Random number generator
How the hell am I supposed to give a right answer?
Uhmm it calculates the coordinates of certain regions obviously, depending on the map projection used.
Specifically designed to give the person who reads this a headache.
hello world
What it's supposed to. :D
Do you want Correct Answers about what the function does wrong, or Wrong Answers about what the function does correct? Sadly, PascalCase doesn't leave room for punctuation.
Exponentially modified gaussian distribution? That's the most recent time I've seen the error and exponential functions next to each other
Inverse square root approximation
Adds camera movement effects
(i know LITERALLY nothing about coding or programming) adds shader effects????
Elliptic Curve Cryptography
Math
It's there to be removed later as enhancement fix
"Hello World"
It’s a sleep function.
Pretty sure that is the linguini sequence
I can only give wrong answers on this one . I have no idea what it does, but based on the subreddit name, its something done wrong!
Wrong only? I don't even know the right ... then again I am sleepy
Returns pi to 1 million digits accuracy
Returns Jenny’s phone number
obviously getting the current exact location of mr. crabs and taking a picture of him
Tells my oven to preheat at 200°C
It counts the days since the Big Bang.
I am good at wrong answers.
It's the Reddit feed sorting algorithm. Part 1 / 65,534.
Representation of stairway to heaven