stackyFACTS
Technology

C's rand function is surprisingly predictable

HERE’S THE INTERESTING PART

Nothing is truly random, especially not a lazy algorithm. The default 'rand()' function in C uses a very basic mathematical sequence that repeats itself so predictably you can calculate exactly what the 'random' number will be.

C's rand function is surprisingly predictable
STACKY / Technology
One discovery leads to another.

Keep exploring facts in this topic.

Technology →
STACKY FOR IPHONE

A bigger world.
One discovery
at a time.

Keep discovering with Stacky. Interesting facts in an app that is always within reach.

Download on the App Store
ONE MORE DISCOVERY?

Keep exploring

All in this topic →
Hash collisions make different files look identical
Technology

Hash collisions make different files look identical

Cryptographic hashes squeeze gigantic files down into short alphanumeric codes. Because the final code has a fixed length, math dictates that eventually, two…

Discover more
Early computers adopted the binary system of ones and zeros primarily because it was the easiest and most reliable way to represent data using electrical circuits that only had two states: on or off.
Technology

Early computers adopted the binary system of ones and zeros primarily because it was the easiest and most reliable way to represent data using electrical circuits that only had two states: on or off.

Early computers adopted the binary system of ones and zeros primarily because it was the easiest and most reliable way to represent data using electrical…

Discover more
Why computers need a negative zero
Technology

Why computers need a negative zero

For those times when absolute nothingness feels a bit too positive. The IEEE 754 standard for binary math requires negative zero to be a distinct value from…

Discover more
Modulo operations on negative values differ by language
Technology

Modulo operations on negative values differ by language

Math is supposed to be universal, unless you ask a programmer. Finding the remainder of a negative number yields entirely different mathematical answers…

Discover more
How scientists solve impossible equations with random numbers
Technology

How scientists solve impossible equations with random numbers

When an equation is too incredibly complex to solve normally, scientists use 'Monte Carlo Simulations'. They literally throw millions of randomly generated…

Discover more
Large floating point numbers lose single digit precision
Technology

Large floating point numbers lose single digit precision

As numbers get absurdly huge, computers just stop caring about the details. Floating point architecture prioritizes scale over exactness, meaning if a…

Discover more
StackyMore discoveries in the app
Download on the App Store