exponential growth problem with showing 19 digits
Posted: Tue Dec 22, 2020 7:09 pm
Hi friends,
surely most of you if not all know the story of the grains of rice on a chessboard. On the first field you put one grain, on the second field the first field is doubled, on the third field the second field is doubled and so on up to field 64. I have written a small program to demonstrate every step in this calculation. It works fine, but on the 64th field the result is unexpected: the 6 most right digits should be "775808" but it turns out they are :"776000".
I don't know why that happens. 19 digits should be possible, the number on field 63 also has 19 digits, which are shown exactly.
I have attached a zip file with all files necessary and a screenshot. I use the 32 bit version of hmg as you can see on the screenshot. Would a 64 bit version show the complete right 19 digits? Who can explain?
Thx Robert
surely most of you if not all know the story of the grains of rice on a chessboard. On the first field you put one grain, on the second field the first field is doubled, on the third field the second field is doubled and so on up to field 64. I have written a small program to demonstrate every step in this calculation. It works fine, but on the 64th field the result is unexpected: the 6 most right digits should be "775808" but it turns out they are :"776000".
I don't know why that happens. 19 digits should be possible, the number on field 63 also has 19 digits, which are shown exactly.
I have attached a zip file with all files necessary and a screenshot. I use the 32 bit version of hmg as you can see on the screenshot. Would a 64 bit version show the complete right 19 digits? Who can explain?
Thx Robert