[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: I beg you, PLEASE prove that 0.123456789101112131415 is IRRATIONAL



At 04:38 PM 1/19/97 -0600, snow wrote:

>    x=0;
>    x1=0;
>    x++;
>    x--;
>  
>    Would give you all int's, the only problem you have is granularity.

Nice, but you have a typo, the result would be the same as x is both
incremented and decremented before it can be output.
I am assumming that the second block of code has it right.

>    x=0.00000000001;
>    y=0.00000000001;
>    x1=x;
>    x=x+y;
>    x1=x1-y;

Also, I am assumming that the increment, decrement portion of the code
should be in a loop.  Otherwise this will result in exactly one value for x,
and one for x1.

The output of the first block is x=1, x1=0.
The output of the second block is x=0.00000000002, y=0.00000000001,
x1=0.00000000000.

Also, the code does have other errors that don't "ring any bells" as they
allow the mind to figure out what your intent is.  Not unlike the many
complaints in "The Far Side" where everyone complains that it is the female
mosquito that bites people while ignoring that no mosquito has ever
willingly walked into an appropiately scaled house wearing a hat.