Question: Why are args being changed to integers?

The following code is part of my attempt to answer the recent Question about the bifurcation of the map f:= x-> exp(x^2*(a-x)). Two very weird things are happening. They can be seen by applying trace to f. The first is that the input argument to f seems to be changed to a very large integer. The second is that for some real values of a and x, I get imaginary results from this obviously real-valued function. Why are these things happening?


f:= x-> exp(x^2*(a-x)):


Iterate:= proc(a, x0:= 1., n:= 2000)
local A:= hfarray(1..n, [x0]), f:= subs(:-a= a, eval(:-f));          
          proc(f, A, n)
          local k;
               for k from 2 to n do A[k]:= f(A[k-1]) end do
          end proc
          (f, A, n);
     evalf[4]~(convert(A[1000..], set))
end proc:


{--> enter f, args = 4607182418800017408




<-- exit f (now in unknown) = 4607413323290551347}
{--> enter f, args = 4607413323290551347




<-- exit f (now in unknown) = 4607169774561176020}
{--> enter f, args = 4607169774561176020




Warning,  computation interrupted



{--> enter f, args = 4607182418800017408




<-- exit f (now in unknown) = HFloat(0.7545897527558614)+HFloat(0.19267839720238844)*I}

Error, (in unknown) unable to store 'HFloat(0.7545897527558614)+HFloat(0.19267839720238844)*I' when datatype=float[8]





Please Wait...