|
Computers are
a very powerful tool. For example, the following Basic program illustrates
their ability to represent and print extremely small numbers.
10 FOR k=0 TO
100
20 LET epsilon 2^(-k)
30 PRINT "k=", k, "epsilon", epsilon
40 NEXT k
50 END
But we must not
over estimate their power. Edit the above program by replacing lone
20 with the one below and inserting line 356 between lines 30 and
40 and lines 44 and 45 between lines 40 and 50. Notice that as 2^(-k)
becomes extremely small when executing the operation(1+2^(-k))-1 the
computer approximates 2^(-k) by zero.
20 LET epsilon
= (1+2^(-k))-1
35 IF epsilon = 0 THEN 44
44 LET e =k
45PRINT "e is", e, "Machine Epsilon is", 2^(-(e-1))
The number 2^-(e-1)
is said to be the Machine Epsilon number and converting 2^-(e-1) to
decimal representation gives the number of decimal digits your computer
is accurate to.
|