[R] bug?

(Ted Harding) Ted.Harding at nessie.mcc.ac.uk
Mon Jul 14 19:22:01 CEST 2003


On 14-Jul-03 Ted Harding wrote:
> Spot on, Baz!
> 
> An intriguing example to set people is the following:
> 
> Write a program to generate a sequence of numbers x(0) ( = anything in
> the range 0 <= x <= 1, chosen by user), x(1), x(2), ... , x(n), ...
> where
>    x(n+1) = f(x(n)), ...
> and f() is defined by
>    f(x) = 2*x if 0 <= x <= 1/2
>    f(x) = 2*(1-x) if 1/2 <= x <= 1
> [...]
> Mathematically, all other numbers are not equilibria and the sequence
> is "chaotic", yet this cannot be observed either. In fact the sequence
> generated will arrive at 0 (and stay there) in at most (N+1) steps
> where N is the number of bits in the abscissa of the floating-point
> representation.

Sorry! This is inaccurate (I was thinking in terms of a zero exponent
2^0 in the FP representation of x(0) -- and by the way of course it's
"mantissa" and not "abscissa"!). Anyway, the above is true, even with a
very small x(0) = 2^(-E)*0.1... , once the multplications by 2 have taken
it up to the crossover from < 1/2 to > 1/2.

Ted.


--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk>
Fax-to-email: +44 (0)870 167 1972
Date: 14-Jul-03                                       Time: 18:22:01
------------------------------ XFMail ------------------------------




More information about the R-help mailing list