[Jprogramming] Generalized continued fractions
Pascal Jasmin
godspiral2000 at yahoo.ca
Sun Feb 23 23:13:47 UTC 2014
I think the spec calls for different lists of a and b?
----- Original Message -----
From: Lizanets Danylo <iamweasel at ukr.net>
To: programming at jsoftware.com
Cc: "programming at jsoftware.com" <programming at jsoftware.com>
Sent: Sunday, February 23, 2014 5:55:29 PM
Subject: Re: [Jprogramming] Generalized continued fractions
Use (+%)/
(+%)/\9$1
1 2 1.5 1.66667 1.6 1.625 1.61538 1.61905 1.61765
--- Original message ---
From: "km" < km at math.uh.edu >
Date: 24 February 2014, 00:17:52
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
More information about the Programming
mailing list