in the book "Handbook of Floating-Point Arithmetic" by Jean-Michel Muller and others, page 10
shows an interesting example, if you google for the afore mentioned book you may find a pdf of the same
Dest Console
n = 25
Read approximate_value
(i
) euler = 2.7182818284590452353602874713527#
Print "Exact value = n! * e - int(e * n!) where e = 2.718281828459045..." Print " n Approximate value computed" account = euler - 1#
account = i * account - 1
Print approximate_value
(j
), account
output
Exact value = n! * e - int(e * n!) where e = 2.718281828459045...
n Approximate value computed
1 .7182818284590452 .7182818284590451
2 .4365636569180905 .4365636569180902
3 .3096909707542714 .3096909707542705
4 .2387638830170856 .2387638830170822
5 .1938194150854282 .193819415085411
6 .1629164905125695 .1629164905124654
7 .1404154335879862 .1404154335872576
8 .1233234687038897 .123323468698061
9 .1099112183350075 .109911218282548
10 9.911218335007541D-02 9.911218282547907D-02
11 .0902340168508295 9.023401108026974D-02
12 .0828082022099543 8.280813296323686D-02
13 .0765066287294056 7.650572852207915D-02
14 .0710928022116781 7.108019930910814D-02
15 .0663920331751714 6.620298963662208D-02
16 .0622725308027424 5.924783418595325D-02
17 .0586330236466206 7.213181161205284D-03
18 .0553944256391715 -.870162739098305
19 .0524940871442588 -17.5330920428678
20 .0498817428851762 -351.661840857356
21 .0475166005887012 -7385.898658004473
22 .0453652129514256 -162490.7704760984
23 .0433998978827887 -3737288.720950264
24 .0415975491869292 -89694930.30280632
25 .0399387296732302 -2242373258.570158