Nepedia
Back to Discover
Independent Reader
🔢

Primitive recursive function

math Maturity 11-13 Next article →

Computers use sets of steps to solve math problems. Some of these steps are very predictable. We call these primitive recursive functions. A function is just a rule for math. It takes numbers and gives back a new number.

Think about a computer loop. A loop is when a computer does a task many times. In these special functions, we know the loop limit first. We know exactly how many times it will run. This makes the math very steady and safe. Most math we study uses these rules. Addition and division use them. Even finding prime numbers uses them.

These functions can do many tasks. They can find the next number in a line. They can check if a number is zero. They can even handle logic, like "if this is true, then do that." Some math rules are much harder. There are rules that grow too fast for these simple loops. One famous example is the Ackermann function. It is a rule that a computer can solve, but it is not primitive recursive. Most of the math we use every day stays within the safe bounds of these predictable rules.

192 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

More to explore

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.