MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

Problem with implementing the following functions


Hello,

here are the functions

q[(Sqrt[x_] + (z_))/(y_), 1] := (x - (Floor[(z + Sqrt[x])/y]*y - 
z)^2)/y

q[(Sqrt[x_] + (z_))/(y_), n_] :=
  q[(z + Sqrt[x])/y, n - 2] +
    a[(z + Sqrt[x])/y, n - 1]*(
        m[(z + Sqrt[x])/y, n - 1] - m[(z + Sqrt[x])/y, n])

a[(Sqrt[x_] + (z_))/(y_), 0] := Floor[(z + Sqrt[x])/y]

a[(Sqrt[x_] + (z_))/(y_), n_] :=
  Floor[(m[(z + Sqrt[x])/y, n] + Sqrt[x])/q[(z + Sqrt[x])/y, n]]

m[(Sqrt[x_] + (z_))/(y_), 1] := Floor[(z + Sqrt[x])/y]*y - z

m[(Sqrt[x_] + (z_))/(y_), n_] :=
  a[(z + Sqrt[x])/y, n - 1]*q[(z + Sqrt[x])/y, n - 1] -
    m[(z + Sqrt[x])/y, n - 1]



For some reason mathematica gives me blank inputs when I do 
a[(9+Sqrt[18])/9,5] (or any n for that matter.

Any ideas?



Thanks,



Matt


  • Prev by Date: Appending an element to a list
  • Next by Date: Monte Carlo in Mathematica ?
  • Previous by thread: Re: Appending an element to a list
  • Next by thread: Re: Problem with implementing the following functions