Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

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

Search the Archive

Problem with implementing the following functions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg23874] Problem with implementing the following functions
  • From: "Matt Herman" <Henayni at hotmail.com>
  • Date: Thu, 15 Jun 2000 00:51:11 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

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