All the lines were broken. It looks better in J -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Linda Alvord Sent: Tuesday, March 11, 2014 6:24 AM To: [email protected] Subject: Re: [Jprogramming] Approximating e
timer=:6!:2 There is just no stopping J's enthusiasm. _100]\(98$' '),0j300 ": +`%/1x, 1000#1 1. 6180339887498948482045868343656381177203091798057628621354486227052604628189 024497072072041893911374 8475408807538689175212663386222353693179318006076672635443338908659593958290 563832266131992829026788 0675208758104918070931082769161711588547579905072941841930921149168203278391 969235282464469370447130 _100]\(98$' '),0j1100 ": +`%/1x, 1100#1 1. 6180339887498948482045868343656381177203091798057628621354486227052604628189 024497072072041893911374 8475408807538689175212663386222353693179318006076672635443338908659593958290 563832266131992829026788 0675208766892501711696207032209948774713731031194615218069509426154452674774 946198918968183974333946 3961032679199041653209764655435857238765483192970514580819254608482099394943 966969200582056053230168 1598039204618878295407755400086940446906345390251673221613249097608958985533 327432377743536831852140 6712608235447895568115783816773356314193221167292283468883435417388453869335 800601417992313087348808 1268781084369389393644479063568868718716832126347891122222860156673565173849 888669171059671968041153 6598143550936975533354582792762185557404919567976447889117423357236606351686 962799224361349185861412 6747389861308427840063864718696864899722617691873347229638175975752003132683 379087981461272956844820 3965537568972438372788609476299149042710087455786477170772207716552998423396 879062499868996460408493 6407468558359969242121517020368148735268450016879687281654050175929388520554 960935940520058313516300 1 timer '_100]\(98$'' ''),0j1000 ": +`%/1x, 1000#1' 0.570214 1 timer '_100]\(98$'' ''),0j1100 ": +`%/1x, 1100#1' 0.722473 Linda -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Bo Jacoby Sent: Tuesday, March 11, 2014 4:30 AM To: [email protected] Subject: Re: [Jprogramming] Approximating e >:@*/%>:i.20 2.71828 This speeds up the series. Den 7:11 tirsdag den 11. marts 2014 skrev Roger Hui <[email protected]>: > If I have 32-bit numbers, when does this information become fiction. >> Also how can I get the best possible and correct decimal approximation >> from these rational numbers? > >32-bits give you about 10 decimal digits. (0 j. n) ": x displays x to n >decimal places. Where the following two outputs agree tells you how many >digits for +`%/401#1x can be trusted. > > _100]\(98$' '),0j200 ": +`%/1x, 400#1 > > 1. >618033988749894848204586834365638117720309179805762862135448622705260462818 9024497050372347293136948 >177450525185665501560915664574355333288528960891052104224989220371506289905 5972967323443765486133617 > > _100]\(98$' '),0j200 ": +`%/1x, 500#1 > > 1. >618033988749894848204586834365638117720309179805762862135448622705260462818 9024497072072041893911374 >847513484600003527850118129932794696670027933715101048272531831502408108347 4561817534485930797695298 > > > > > >On Mon, Mar 10, 2014 at 7:07 PM, Linda Alvord <[email protected]>wrote: > >> Here's the version which gets just the final ratio. >> >> +`%/1x, 400#1 >> >> 734544867157818093234908902110449296423351r453973694165307953197296969697410 >> 619233826 >> >> >> >> 734544867157818093234908902110449296423351%453973694165307953197296969697410 >> 619233826 >> 1.61803 >> >> (32#'O'),' ',32#'O' >> OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO >> >> If I have 32-bit numbers, when does this information become fiction. Also >> how can I get the best possible and correct decimal approximation from >> these >> rational numbers? >> >> Linda >> >> >> >> ----Original Message----- >> From: [email protected] >> [mailto:[email protected]] On Behalf Of Linda >> Alvord >> Sent: Monday, March 10, 2014 9:32 PM >> To: [email protected] >> Subject: Re: [Jprogramming] Approximating e >> >> Thanks for your hints. I always wanted to get rational approximations for >> the Golden Section. >> >> {.|.+`%/\1x, 300#1 >> 26099748102093884802012313146549r16130531424904581415797907386349 >> >> 32#'O' >> OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO >> >> {.|.+`%/\1x, 400#1 >> >> 734544867157818093234908902110449296423351r453973694165307953197296969697410 >> 619233826 >> >> >> >> 734544867157818093234908902110449296423351%453973694165307953197296969697410 >> 619233826 >> 1.61803 >> >> How can I get the best possible decimal approximation (I have 32 bit >> digits)? >> >> Linda >> >> >> >> -----Original Message----- >> From: [email protected] >> [mailto:[email protected]] On Behalf Of EelVex >> Sent: Monday, March 10, 2014 7:12 PM >> To: Programming forum >> Subject: Re: [Jprogramming] Approximating e >> >> * 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 <[email protected]> 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 > >> > >> ---------------------------------------------------------------------- >> For information about J forums see http://www.jsoftware.com/forums.htm >> >> ---------------------------------------------------------------------- >> For information about J forums see http://www.jsoftware.com/forums.htm >> >> ---------------------------------------------------------------------- >> For information about J forums see http://www.jsoftware.com/forums.htm >> >---------------------------------------------------------------------- >For information about J forums see http://www.jsoftware.com/forums.htm > > > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
