Home: Advanced Topics: Sketchpad's Internal Mathematics
Sketchpad’s Internal Mathematics
Sketchpad’s internal mathematics determine how the program computes and represents numbers, geometric figures, functions, and other mathematical quantities. This in turn determines how these objects appear graphically, numerically, or symbolically.
At the numeric level, Sketchpad represents point coordinates and other quantities using 64-bit floating-point arithmetic. This standard representation for scientific computation allows your computer to represent a value with 14 to 16 significant digits of decimal precision over a wide range of magnitudes (roughly, as large as ±10300 and as small as ±10–300). While this is very precise, it is not exact in a mathematical sense. (For example, π cannot be represented exactly with only 15 significant digits.) Sketchpad uses tuned algorithms to attempt to represent numbers as close to their exact value as possible, and to minimize the inevitable error introduced by calculating with only a finite number of significant digits. Nonetheless, you may witness numerical error effects in the least significant digits of numbers in sketches involving a lot of internal calculation. Regrettably, no computer or computer program can represent every number exactly: there are an infinite number of numbers, of course, and—at least today!—computers have only a finite amount of memory. Thus, while Sketchpad’s numeric calculations are generally reliable and can serve as the basis of a convincing argument or conjecture, a Sketchpad result should never be mistaken for constituting a mathematical proof.
Don’t confuse the displayed precision of a value with its internal precision or accuracy. When you display a value (such as a measurement), it appears only to the number of decimal places you choose in Preferences or Properties. Internally, that number is represented to much greater precision, as described here.
At the graphical level, Sketchpad transforms its internal numeric representations into the shapes and positions that appear in your sketch window. For objects such as circles, points, and segments, the resulting images are as accurate as can be displayed on your computer screen. (When you print to a printer with higher resolution than your screen, you’ll see the images are even more accurate than their on-screen representations.)Finally, at the symbolic level, Sketchpad performs simple computer algebra to differentiate functions when you use the Derivative command from the Graph menu. While these computed derivatives are generally reliable for graphing and evaluation purposes, they may not be exact. In particular, when differentiating intricate functions, Sketchpad may fail to simplify the result fully, introducing point discontinuities in the derivative; and Sketchpad does not compute domain restrictions on the derivative function. Use Derivative to compute the slope of a function at an arbitrary point for graphing purposes or for mathematical constructions, but be sure to verify the result before using it as the basis of a mathematical proof.
See also
Accuracy vs. Precision
Plot Properties
Sampling Preferences
Derivative
Unit Preferences