The Algorithms of the Wolfram Language

The builtin functions of the Wolfram Language implement a very large number of algorithms from computer science and mathematics. Some of these algorithms are fairly old, but the vast majority had to be created or at least modified specifically for the Wolfram Language. Most of the more mathematical algorithms in the Wolfram Language ultimately carry out operations which at least at some time in the past were performed by hand. In almost all cases, however, the algorithms use methods very different from those common in hand calculation.





The same is true with most of the mathematical algorithms in the Wolfram Language. One striking feature is that even for operations that are simple to describe, the systematic algorithms to perform these operations in the Wolfram Language involve fairly advanced mathematical or computational ideas.


The use of powerful systematic algorithms is important in making the builtin functions in the Wolfram Language able to handle difficult and general cases. But for easy cases that may be fairly common in practice it is often possible to use simpler and more efficient algorithms.

As a result, builtin functions in the Wolfram Language often have large numbers of extra pieces that handle various kinds of special cases. These extra pieces can contribute greatly to the complexity of the internal code, often taking what would otherwise be a fivepage algorithm and making it hundreds of pages long.

Most of the algorithms in the Wolfram Language, including all their special cases, were explicitly constructed by hand. But some algorithms were instead effectively created automatically by computer.

Many of the algorithms used for machineprecision numerical evaluation of mathematical functions are examples. The main parts of such algorithms are formulas which are as short as possible but which yield the best numerical approximations.

Most such formulas used in the Wolfram Language were actually derived by the Wolfram Language itself. Often many months of computation were required, but the result was a short formula that can be used to evaluate functions in an optimal way.