a1n =. i.5 b1n =. >: i.5 b0 =. 1 1 + +/(i.5) % (>: i.5) 3.71667
----- Original Message ----- From: km <k...@math.uh.edu> To: "programm...@jsoftware.com" <programm...@jsoftware.com> Cc: Sent: Sunday, February 23, 2014 5:17:36 PM Subject: [Jprogramming] Generalized continued fractions The generalized continued fraction b0 + a1 --------- b1 + a2 --------- b2 + a3 -------- b3 + ... is the infinite sequence b0 , b0 + a1%b1 , b0 + a1%b1 + a2%b2 , b0 + a1%b1 + a2%b2 + a3%b3 , ... where between the commas I am assuming J's right-to-left evaluation. The nth term would be b0 + a1%b1 + a2%b2 + a3%b3 + ... + an%bn (still using right to left evaluation). What is a good way to calculate this nth term in J? For a half-page introduction to generalized continued fractions see http://people.math.sfu.ca/~cbm/aands/page_19.htm Continued fractions for ln(1+z) and ln((1+z)%(1-z)) are given here http://people.math.sfu.ca/~cbm/aands/page_68.htm --Kip Murray Sent from my iPad ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm