Spreadsheet Miscalculation of 30!
Today, I encountered something amusing. I was trying to calculate Factorial 30 (also written as 30!). Don’t ask me why I was trying to calculate Factorial. :-).
As a refresher for some of us who may have forgot Factorials, Factorial 30 is product of all positive integers between 1 and 30 inclusive.
30! = 30 x 29 x 28 x 27 x 26 x 25 x 24 x 23 x 22 x 21 x 20 x 19 … x 1.
With Microsoft Excel, using both PRODUCT function and manual multiplication 30 x 29 x ….
30! = 265,252,859,812,191,000,000,000,000,000,000
Same results on my MacBook with Numbers program, using both PRODUCT function and manual multiplication.
30! = 265,252,859,812,191,000,000,000,000,000,000
I got slightly different result with Google Docs Spreadsheet, using PRODUCT function
30! = 265,252,859,812,191,030,000,000,000,000,000
And, another different result with Google Docs Spreadsheet using manual multiplication
30! = 265,252,859,812,191,100,000,000,000,000,000
But actually,
30! = 265,252,859,812,191,058,636,308,480,000,000
It appears spreadsheets are rounding numbers after 15 or 16 digits.
No comments yet.
Leave a comment
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « May | ||||||
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 30 | |||
