Next: Debugging Calc, Previous: Recursion Depth, Up: Troubleshooting Commands [Contents][Index]

#### 3.11.3 Caches

Calc saves certain values after they have been computed once. For example, the `P` (`calc-pi`) command initially “knows” the constant ‘`pi`’ to about 20 decimal places; if the current precision is greater than this, it will recompute ‘`pi`’ using a series approximation. This value will not need to be recomputed ever again unless you raise the precision still further. Many operations such as logarithms and sines make use of similarly cached values such as ‘`pi/4`’ and ‘`ln(2)`’. The visible effect of caching is that high-precision computations may seem to do extra work the first time. Other things cached include powers of two (for the binary arithmetic functions), matrix inverses and determinants, symbolic integrals, and data points computed by the graphing commands.

If you suspect a Calculator cache has become corrupt, you can use the `calc-flush-caches` command to reset all caches to the empty state. (This should only be necessary in the event of bugs in the Calculator.) The `C-x * 0` (with the zero key) command also resets caches along with all other aspects of the Calculator’s state.