Next | Continued Fraction Arithmetic | 8 |
For computer calculation, we solve the arithmetic problem by using only finite decimals
But then the 1/3 problem is even worse:
#include <stdio.h>
int main(void) { unsigned i; double total = 0;
for (i=0; i < 300; i++) total += 1.0/3.0;
printf("%.20f\n", total); return 0; }
The output:
99.99999999999965893949
(The computer is using binary expansions, not decimal expansions)
(But the problem is just the same.)
Next | Back |