Sometimes six digits is too many, and sometimes it is not enough. You can
easily control the number of digits that Mathematica uses in its floating point
calculations. For example, evaluating
SetPrecision[1/9., 10]
0.11111111111
will tell Mathematica to use a ten -digit floating point number to represent the real number version of 1/9. Try reevaluating the three floating-point divisions above and you'll see the
difference. You can change the length of Mathematica's floating point numbers any
time you please during a Mathematica session. For the time being, though, let's
change it back to 10.
\send{Digits := 10
There is a tradeoff between the accuracy of numbers and the speed with which
computers can manipulate them. This tradeoff isn't so important for the kinds
of problems that you've been doing, but it becomes extremely important in large
programs that deal with millions or billions of numbers. Understanding the
computational differences between integers and floating point numbers is
crucially important in C and Fortran. Not surprisingly, we'll have much more
to say about this topic later in the course.