[Jprogramming] Approximating e
EelVex
eelvex at gmail.com
Mon Mar 10 23:11:35 UTC 2014
* Summing infinite series
+/%!i.100x
+/^ t. i.100x NB. Taylor coefficients
%+/((_1&^)%!)i.100x
etc
* Taking an asymptotic
(-^~1-%) 100x
((^~%~^~@>:) - (^~%^~@<:))100x
etc
* Continued fractions
+`%/2 1,2#>:i.100x
+`%/2, 2#2+i.100x
(+%)/2 1, ,(1 1,~])"0 +:>:i.100x NB. canonical form
On Mon, Mar 10, 2014 at 6:38 PM, km <km at math.uh.edu> wrote:
> The rational 2721r1001 approximates e to six, almost seven decimal
> places:
>
> 0j7 ": (^ 1) ,: 2721r1001
> 2.7182818
> 2.7182817
>
> I got 2721r1001 from a continued fraction. How would you look for
> rational approximations to e ?
>
> --Kip Murray
>
> Sent from my iPad
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
More information about the Programming
mailing list