lua-users home
lua-l archive

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


Op Vr. 28 Jun. 2019 om 18:11 het Albert Chan <albertmcchan@yahoo.com> geskryf:
>
>
> > On Jun 28, 2019, at 9:24 AM, Albert Chan <albertmcchan@yahoo.com> wrote:
> >
> > Had we use a higher guess, say 4, we would have c > 16
>
> Example, x^x = c = 15.8, guess x0 = 4, iterations diverges:
>
> x1 = log(c,x0) = 1.9909
> x2 = log(c,x1) = 4.0081
> x3 = log(c,x2) = 1.9880
> x4 = log(c,x3) = 4.0167 ...

x0 is not arbitrary. You can't have x0=4 except when C=exp(4).

The shortest code has x uninitialized, i.e. x=nil.  Therefore x0 =
log(C,nil) = log(C).