Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > sci.math > #488993 > unrolled thread
| Started by | djoyce099 <hlauk.h.bogart@gmail.com> |
|---|---|
| First post | 2020-06-27 05:38 -0700 |
| Last post | 2020-07-03 19:04 -0700 |
| Articles | 20 on this page of 92 — 11 participants |
Back to article view | Back to sci.math
What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-06-27 05:38 -0700
What do these sequential fractions represent? bassam karzeddin <sophyan2003@gmail.com> - 2020-06-27 06:06 -0700
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-06-27 06:21 -0700
Re: What do these sequential fractions represent? Sergio <invalid@invalid.com> - 2020-06-27 09:27 -0500
Re: What do these sequential fractions represent? Peter <peterxpercival@hotmail.com> - 2020-06-27 17:09 +0100
Re: What do these sequential fractions represent? Sergio <invalid@invalid.com> - 2020-06-27 11:36 -0500
Re: What do these sequential fractions represent? Barry Schwarz <schwarzb@delq.com> - 2020-06-27 08:58 -0700
Re: What do these sequential fractions represent? Sergio <invalid@invalid.com> - 2020-06-27 11:49 -0500
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-06-27 10:34 -0700
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-06-27 10:38 -0700
Re: What do these sequential fractions represent? James Waldby <not@valid.invalid> - 2020-06-27 20:52 +0000
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-06-27 14:25 -0700
Re: What do these sequential fractions represent? Sergio <invalid@invalid.com> - 2020-06-28 21:53 -0500
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-06-27 11:57 -0700
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-06-27 12:03 -0700
Re: What do these sequential fractions represent? Peter <peterxpercival@hotmail.com> - 2020-06-27 20:09 +0100
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-06-27 12:26 -0700
Re: What do these sequential fractions represent? Peter <peterxpercival@hotmail.com> - 2020-06-27 21:07 +0100
Re: What do these sequential fractions represent? Mitch Raemsch <mitchrae3323@gmail.com> - 2020-06-27 13:11 -0700
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-06-27 13:22 -0700
Re: What do these sequential fractions represent? Peter <peterxpercival@hotmail.com> - 2020-06-27 21:24 +0100
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-06-27 13:30 -0700
Re: What do these sequential fractions represent? Peter <peterxpercival@hotmail.com> - 2020-06-27 22:12 +0100
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-06-27 14:39 -0700
Re: What do these sequential fractions represent? James Waldby <not@valid.invalid> - 2020-06-28 06:10 +0000
Re: What do these sequential fractions represent? Barry Schwarz <schwarzb@delq.com> - 2020-06-28 02:17 -0700
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-06-28 05:14 -0700
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-06-28 05:21 -0700
Re: What do these sequential fractions represent? Barry Schwarz <schwarzb@delq.com> - 2020-06-28 16:36 -0700
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-06-29 09:48 -0700
Re: What do these sequential fractions represent? Peter <peterxpercival@hotmail.com> - 2020-06-29 17:57 +0100
Re: What do these sequential fractions represent? Sergio <invalid@invalid.com> - 2020-06-28 21:56 -0500
Re: What do these sequential fractions represent? Peter <peterxpercival@hotmail.com> - 2020-06-28 13:22 +0100
Re: What do these sequential fractions represent? Barry Schwarz <schwarzb@delq.com> - 2020-06-28 16:34 -0700
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-06-30 16:09 -0700
Re: What do these sequential fractions represent? Barry Schwarz <schwarzb@delq.com> - 2020-06-30 21:30 -0700
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-07-01 05:42 -0700
Re: What do these sequential fractions represent? Sergio <invalid@invalid.com> - 2020-07-01 09:39 -0500
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-07-01 10:20 -0700
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-07-01 11:29 -0700
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-07-01 13:57 -0700
Re: What do these sequential fractions represent? Barry Schwarz <schwarzb@delq.com> - 2020-07-01 14:29 -0700
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-07-01 15:27 -0700
Re: What do these sequential fractions represent? konyberg <konyberg@online.no> - 2020-07-01 15:38 -0700
Re: What do these sequential fractions represent? djoyce099 <Hlauk.H.Bogart@gmail.com> - 2020-07-01 15:58 -0700
Re: What do these sequential fractions represent? Barry Schwarz <schwarzb@delq.com> - 2020-07-02 00:25 -0700
Re: What do these sequential fractions represent? Sergio <invalid@invalid.com> - 2020-07-02 10:29 -0500
Re: What do these sequential fractions represent? djoyce099 <Hlauk.H.Bogart@gmail.com> - 2020-07-01 15:46 -0700
Re: What do these sequential fractions represent? djoyce099 <Hlauk.H.Bogart@gmail.com> - 2020-07-01 16:17 -0700
Re: What do these sequential fractions represent? djoyce099 <Hlauk.H.Bogart@gmail.com> - 2020-07-01 16:23 -0700
Re: What do these sequential fractions represent? djoyce099 <Hlauk.H.Bogart@gmail.com> - 2020-07-01 16:26 -0700
Re: What do these sequential fractions represent? Barry Schwarz <schwarzb@delq.com> - 2020-07-02 00:21 -0700
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-07-02 14:09 -0700
Re: What do these sequential fractions represent? Sergio <invalid@invalid.com> - 2020-07-02 10:26 -0500
Re: What do these sequential fractions represent? James Waldby <not@valid.invalid> - 2020-07-02 05:43 +0000
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-07-02 14:00 -0700
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-07-02 14:06 -0700
Re: What do these sequential fractions represent? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2020-07-02 14:06 -0700
Re: What do these sequential fractions represent? Sergio <invalid@invalid.com> - 2020-07-02 17:08 -0500
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-07-02 19:46 -0700
Re: What do these sequential fractions represent? Sergio <invalid@invalid.com> - 2020-07-02 22:06 -0500
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-07-02 19:41 -0700
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-07-02 20:15 -0700
Re: What do these sequential fractions represent? Sergio <invalid@invalid.com> - 2020-07-02 22:24 -0500
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-07-02 21:55 -0700
Re: What do these sequential fractions represent? Barry Schwarz <schwarzb@delq.com> - 2020-07-03 07:51 -0700
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-07-03 08:30 -0700
Re: What do these sequential fractions represent? Peter <peterxpercival@hotmail.com> - 2020-07-03 16:30 +0100
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-07-03 08:43 -0700
Re: What do these sequential fractions represent? Barry Schwarz <schwarzb@delq.com> - 2020-07-03 11:42 -0700
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-07-03 14:03 -0700
Re: What do these sequential fractions represent? Barry Schwarz <schwarzb@delq.com> - 2020-07-03 15:46 -0700
Re: What do these sequential fractions represent? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2020-07-03 15:53 -0700
Re: What do these sequential fractions represent? FromTheRafters <erratic@nomail.afraid.org> - 2020-07-03 19:09 -0400
Re: What do these sequential fractions represent? FromTheRafters <erratic@nomail.afraid.org> - 2020-07-03 15:22 -0400
Re: What do these sequential fractions represent? James Waldby <not@valid.invalid> - 2020-07-03 05:18 +0000
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-07-03 06:14 -0700
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-07-03 08:29 -0700
Re: What do these sequential fractions represent? James Waldby <not@valid.invalid> - 2020-07-04 04:12 +0000
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-07-03 21:43 -0700
Re: What do these sequential fractions represent? konyberg <konyberg@online.no> - 2020-07-03 12:29 -0700
Re: What do these sequential fractions represent? James Waldby <not@valid.invalid> - 2020-07-04 20:36 +0000
Re: What do these sequential fractions represent? konyberg <konyberg@online.no> - 2020-07-04 13:50 -0700
Re: What do these sequential fractions represent? konyberg <konyberg@online.no> - 2020-07-04 14:15 -0700
Re: What do these sequential fractions represent? Sergio <invalid@invalid.com> - 2020-07-04 16:41 -0500
Re: What do these sequential fractions represent? konyberg <konyberg@online.no> - 2020-07-04 14:47 -0700
Re: What do these sequential fractions represent? Sergio <invalid@invalid.com> - 2020-07-04 18:05 -0500
Re: What do these sequential fractions represent? FromTheRafters <erratic@nomail.afraid.org> - 2020-07-05 08:19 -0400
Re: What do these sequential fractions represent? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2020-07-04 14:52 -0700
Re: What do these sequential fractions represent? Sergio <invalid@invalid.com> - 2020-07-04 18:03 -0500
Re: What do these sequential fractions represent? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2020-06-28 20:55 -0700
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-07-03 19:04 -0700
Page 4 of 5 — ← Prev page 1 2 3 [4] 5 Next page →
| From | Sergio <invalid@invalid.com> |
|---|---|
| Date | 2020-07-02 22:06 -0500 |
| Message-ID | <rdm7be$39k$1@gioia.aioe.org> |
| In reply to | #489581 |
On 7/2/2020 9:46 PM, djoyce099 wrote:
> On Thursday, July 2, 2020 at 6:09:05 PM UTC-4, Sergio wrote:
>> On 7/2/2020 4:06 PM, Chris M. Thomasson wrote:
>>> On 7/2/2020 2:00 PM, djoyce099 wrote:
>>>> On Thursday, July 2, 2020 at 1:43:25 AM UTC-4, James Waldby wrote:
>>>>> On Wed, 01 Jul 2020 11:29:49 -0700, djoyce099 wrote:
>>>>> ...
>>>>>> Here are the first 9 fractions depicting each step of the above
>>>>>> formula.
>>>>>> 9/3, 11/4, 49/18, 87/32, 1631/600, 11743/4320, 31967/11760,
>>>>>> 876809/322560, 8877691/3265920
>>>>>>
>>>>>> Factorial (9!) is used in determining the last fraction above.
>>>>>> The next term will use factorial (10!)
>>>>>> Also note all, even, odd ---numerator, denominator.
>>>>>>
>>>>>> Who can add to this list?
>>>>>
>>>>> On 27 June I posted python to print out terms of the series; see below.
>>>>>
>>>>> from fractions import Fraction
>>>>> def series(k):
>>>>> s = Fraction(9,3); fac = 1
>>>>> for i in range(2,k):
>>>>> print (f'{i-1:5} {float(s):<20.16} {s}')
>>>>> fac = fac*i
>>>>> s = s - Fraction(1,fac*i*(i-1))
>>>>> series(28)
>>>>>
>>>>> --
>>>>> jiw
>>>> James,
>>>>
>>>> Having problem with -- print (f'{i-1:5} {float(s):<20.16} {s}')
>>>> <-- here
>>>> it highlights the last hyphen in that line }')
>>>> Probably because I have an older version of Python
>>>> Python 2.6.6rel
>>>>
>>>
>>> Try Python 3:
>>>
>>> https://repl.it/languages/python3
>>>
>>> output:
>>>
>>> 1 3.0 3
>>> 2 2.75 11/4
>>> 3 2.722222222222222 49/18
>>> 4 2.71875 87/32
>>> 5 2.718333333333333 1631/600
>>> 6 2.718287037037037 11743/4320
>>> 7 2.71828231292517 31967/11760
>>> 8 2.718281870039683 876809/322560
>>> 9 2.718281831765628 8877691/3265920
>>> 10 2.718281828703704 4697191/1728000
>>> 11 2.718281828475957 1193556233/439084800
>>> 12 2.718281828460142 2232105163/821145600
>>> 13 2.718281828459112 2222710781/817689600
>>> 14 2.718281828459049 3317652307271/1220496076800
>>> 15 2.718281828459046 53319412081141/19615115520000
>>> 16 2.718281828459045 303328210950491/111588212736000
>>> 17 2.718281828459045 2348085347268533/863812325376000
>>> 18 2.718281828459045 313262209859119579/115242726703104000
>>> 19 2.718281828459045 42739099682215483/15722836107264000
>>> 20 2.718281828459045 10174328183458584617/3742926166425600000
>>> 21 2.718281828459045 2916471173788403280463/1072909785605898240000
>>> 22 2.718281828459045 276616117600154259797/101761382761758720000
>>> 23 2.718281828459045
>>> 1616280548597592256096589/594596384994354462720000
>>> 24 2.718281828459045 525679049120391383123453/193386514825944760320000
>>> 25 2.718281828459045
>>> 20668549214802970026810601/7603534334966169600000000
>>> 26 2.718281828459045
>>> 4071822301311698255110413029/1497939712755963789312000000
>>>
>>
>> https://en.wikipedia.org/wiki/List_of_representations_of_e
>>
>> look at the second and third equation up from the line that says "As an
>> Infinte product" just over 1/2 way down
>>
>> they have an upper error bound on it for the last term too!
>> e + 0.6 * 10^(1-n)
>>
>> most of the series like these have a history of who invented/came up
>> with it and when, I have a book somewhere....
>
> Nice to know because I discovered this about 10 years ago but if it was posted
> on wiki before that, I was just reinventing the wheel at the time.
>
> Thanks
>
> Dan
>
it is a interesting series, decending from 3 like that.
it may have come from in the following (1998 ) paper [ MIM with x=1,
also there are 7 new ways to calculate e in that paper, they say "MIM is
breathtaking" ]
http://www.brotherstechnology.com/docs/Closed-Form_Approximations_(MI-1998-12).pdf
the rage back in the 80s and 90s was finding fast convergent series, as
computing power was dirt slow (compared to today)
(the first approximation for e was by Burgi in 1620 !)
then all this stuff got put into canned routines like in java, etc so
not much info out there today on them, burried.
[toc] | [prev] | [next] | [standalone]
| From | djoyce099 <hlauk.h.bogart@gmail.com> |
|---|---|
| Date | 2020-07-02 19:41 -0700 |
| Message-ID | <553dbfe4-41a8-4a5d-810a-a112419b3e8bo@googlegroups.com> |
| In reply to | #489571 |
On Thursday, July 2, 2020 at 5:06:55 PM UTC-4, Chris M. Thomasson wrote:
> On 7/2/2020 2:00 PM, djoyce099 wrote:
> > On Thursday, July 2, 2020 at 1:43:25 AM UTC-4, James Waldby wrote:
> >> On Wed, 01 Jul 2020 11:29:49 -0700, djoyce099 wrote:
> >> ...
> >>> Here are the first 9 fractions depicting each step of the above formula.
> >>>
> >>> 9/3, 11/4, 49/18, 87/32, 1631/600, 11743/4320, 31967/11760,
> >>> 876809/322560, 8877691/3265920
> >>>
> >>> Factorial (9!) is used in determining the last fraction above.
> >>> The next term will use factorial (10!)
> >>> Also note all, even, odd ---numerator, denominator.
> >>>
> >>> Who can add to this list?
> >>
> >> On 27 June I posted python to print out terms of the series; see below.
> >>
> >> from fractions import Fraction
> >> def series(k):
> >> s = Fraction(9,3); fac = 1
> >> for i in range(2,k):
> >> print (f'{i-1:5} {float(s):<20.16} {s}')
> >> fac = fac*i
> >> s = s - Fraction(1,fac*i*(i-1))
> >> series(28)
> >>
> >> --
> >> jiw
> > James,
> >
> > Having problem with -- print (f'{i-1:5} {float(s):<20.16} {s}') <-- here
> > it highlights the last hyphen in that line }')
> >
> > Probably because I have an older version of Python
> > Python 2.6.6rel
> >
>
> Try Python 3:
>
> https://repl.it/languages/python3
>
> output:
>
> 1 3.0 3
> 2 2.75 11/4
> 3 2.722222222222222 49/18
> 4 2.71875 87/32
> 5 2.718333333333333 1631/600
> 6 2.718287037037037 11743/4320
> 7 2.71828231292517 31967/11760
> 8 2.718281870039683 876809/322560
> 9 2.718281831765628 8877691/3265920
> 10 2.718281828703704 4697191/1728000
> 11 2.718281828475957 1193556233/439084800
> 12 2.718281828460142 2232105163/821145600
> 13 2.718281828459112 2222710781/817689600
> 14 2.718281828459049 3317652307271/1220496076800
> 15 2.718281828459046 53319412081141/19615115520000
> 16 2.718281828459045 303328210950491/111588212736000
> 17 2.718281828459045 2348085347268533/863812325376000
> 18 2.718281828459045 313262209859119579/115242726703104000
> 19 2.718281828459045 42739099682215483/15722836107264000
> 20 2.718281828459045 10174328183458584617/3742926166425600000
> 21 2.718281828459045
> 2916471173788403280463/1072909785605898240000
> 22 2.718281828459045 276616117600154259797/101761382761758720000
> 23 2.718281828459045
> 1616280548597592256096589/594596384994354462720000
> 24 2.718281828459045
> 525679049120391383123453/193386514825944760320000
> 25 2.718281828459045
> 20668549214802970026810601/7603534334966169600000000
> 26 2.718281828459045
> 4071822301311698255110413029/1497939712755963789312000000
Nice. I was under the false impression that the numerator and denominator were
ever-increasing between the fractional terms.
Thanks for the web-cite.
Dan
[toc] | [prev] | [next] | [standalone]
| From | djoyce099 <hlauk.h.bogart@gmail.com> |
|---|---|
| Date | 2020-07-02 20:15 -0700 |
| Message-ID | <d98fcc57-413d-4b51-85c3-ad614c4c1709o@googlegroups.com> |
| In reply to | #489580 |
On Thursday, July 2, 2020 at 10:41:24 PM UTC-4, djoyce099 wrote:
> On Thursday, July 2, 2020 at 5:06:55 PM UTC-4, Chris M. Thomasson wrote:
> > On 7/2/2020 2:00 PM, djoyce099 wrote:
> > > On Thursday, July 2, 2020 at 1:43:25 AM UTC-4, James Waldby wrote:
> > >> On Wed, 01 Jul 2020 11:29:49 -0700, djoyce099 wrote:
> > >> ...
> > >>> Here are the first 9 fractions depicting each step of the above formula.
> > >>>
> > >>> 9/3, 11/4, 49/18, 87/32, 1631/600, 11743/4320, 31967/11760,
> > >>> 876809/322560, 8877691/3265920
> > >>>
> > >>> Factorial (9!) is used in determining the last fraction above.
> > >>> The next term will use factorial (10!)
> > >>> Also note all, even, odd ---numerator, denominator.
> > >>>
> > >>> Who can add to this list?
> > >>
> > >> On 27 June I posted python to print out terms of the series; see below.
> > >>
> > >> from fractions import Fraction
> > >> def series(k):
> > >> s = Fraction(9,3); fac = 1
> > >> for i in range(2,k):
> > >> print (f'{i-1:5} {float(s):<20.16} {s}')
> > >> fac = fac*i
> > >> s = s - Fraction(1,fac*i*(i-1))
> > >> series(28)
> > >>
> > >> --
> > >> jiw
> > > James,
> > >
> > > Having problem with -- print (f'{i-1:5} {float(s):<20.16} {s}') <-- here
> > > it highlights the last hyphen in that line }')
> > >
> > > Probably because I have an older version of Python
> > > Python 2.6.6rel
> > >
> >
> > Try Python 3:
> >
> > https://repl.it/languages/python3
> >
> > output:
> >
> > 1 3.0 3
> > 2 2.75 11/4
> > 3 2.722222222222222 49/18
> > 4 2.71875 87/32
> > 5 2.718333333333333 1631/600
> > 6 2.718287037037037 11743/4320
> > 7 2.71828231292517 31967/11760
> > 8 2.718281870039683 876809/322560
> > 9 2.718281831765628 8877691/3265920
> > 10 2.718281828703704 4697191/1728000
> > 11 2.718281828475957 1193556233/439084800
> > 12 2.718281828460142 2232105163/821145600
> > 13 2.718281828459112 2222710781/817689600
> > 14 2.718281828459049 3317652307271/1220496076800
> > 15 2.718281828459046 53319412081141/19615115520000
> > 16 2.718281828459045 303328210950491/111588212736000
> > 17 2.718281828459045 2348085347268533/863812325376000
> > 18 2.718281828459045 313262209859119579/115242726703104000
> > 19 2.718281828459045 42739099682215483/15722836107264000
> > 20 2.718281828459045 10174328183458584617/3742926166425600000
> > 21 2.718281828459045
> > 2916471173788403280463/1072909785605898240000
> > 22 2.718281828459045 276616117600154259797/101761382761758720000
> > 23 2.718281828459045
> > 1616280548597592256096589/594596384994354462720000
> > 24 2.718281828459045
> > 525679049120391383123453/193386514825944760320000
> > 25 2.718281828459045
> > 20668549214802970026810601/7603534334966169600000000
> > 26 2.718281828459045
> > 4071822301311698255110413029/1497939712755963789312000000
>
> Nice. I was under the false impression that the numerator and denominator were
> ever-increasing between the fractional terms.
> Thanks for the web-cite.
>
> Dan
By the way, what is with all odd denominators and even numerators?
Also, the numerators ending in zero(s) from the 5th term on?
By far a smoother convergence then pi.
Does the pattern in (e)'s CF have anything to do with it?
(e) = a transcendental but maybe an Algebraic Irrational?
Dan
[toc] | [prev] | [next] | [standalone]
| From | Sergio <invalid@invalid.com> |
|---|---|
| Date | 2020-07-02 22:24 -0500 |
| Message-ID | <rdm8e1$dbu$1@gioia.aioe.org> |
| In reply to | #489585 |
On 7/2/2020 10:15 PM, djoyce099 wrote:
> On Thursday, July 2, 2020 at 10:41:24 PM UTC-4, djoyce099 wrote:
>> On Thursday, July 2, 2020 at 5:06:55 PM UTC-4, Chris M. Thomasson wrote:
>>> On 7/2/2020 2:00 PM, djoyce099 wrote:
>>>> On Thursday, July 2, 2020 at 1:43:25 AM UTC-4, James Waldby wrote:
>>>>> On Wed, 01 Jul 2020 11:29:49 -0700, djoyce099 wrote:
>>>>> ...
>>>>>> Here are the first 9 fractions depicting each step of the above formula.
>>>>>>
>>>>>> 9/3, 11/4, 49/18, 87/32, 1631/600, 11743/4320, 31967/11760,
>>>>>> 876809/322560, 8877691/3265920
>>>>>>
>>>>>> Factorial (9!) is used in determining the last fraction above.
>>>>>> The next term will use factorial (10!)
>>>>>> Also note all, even, odd ---numerator, denominator.
>>>>>>
>>>>>> Who can add to this list?
>>>>>
>>>>> On 27 June I posted python to print out terms of the series; see below.
>>>>>
>>>>> from fractions import Fraction
>>>>> def series(k):
>>>>> s = Fraction(9,3); fac = 1
>>>>> for i in range(2,k):
>>>>> print (f'{i-1:5} {float(s):<20.16} {s}')
>>>>> fac = fac*i
>>>>> s = s - Fraction(1,fac*i*(i-1))
>>>>> series(28)
>>>>>
>>>>> --
>>>>> jiw
>>>> James,
>>>>
>>>> Having problem with -- print (f'{i-1:5} {float(s):<20.16} {s}') <-- here
>>>> it highlights the last hyphen in that line }')
>>>>
>>>> Probably because I have an older version of Python
>>>> Python 2.6.6rel
>>>>
>>>
>>> Try Python 3:
>>>
>>> https://repl.it/languages/python3
>>>
>>> output:
>>>
>>> 1 3.0 3
>>> 2 2.75 11/4
>>> 3 2.722222222222222 49/18
>>> 4 2.71875 87/32
>>> 5 2.718333333333333 1631/600
>>> 6 2.718287037037037 11743/4320
>>> 7 2.71828231292517 31967/11760
>>> 8 2.718281870039683 876809/322560
>>> 9 2.718281831765628 8877691/3265920
>>> 10 2.718281828703704 4697191/1728000
>>> 11 2.718281828475957 1193556233/439084800
>>> 12 2.718281828460142 2232105163/821145600
>>> 13 2.718281828459112 2222710781/817689600
>>> 14 2.718281828459049 3317652307271/1220496076800
>>> 15 2.718281828459046 53319412081141/19615115520000
>>> 16 2.718281828459045 303328210950491/111588212736000
>>> 17 2.718281828459045 2348085347268533/863812325376000
>>> 18 2.718281828459045 313262209859119579/115242726703104000
>>> 19 2.718281828459045 42739099682215483/15722836107264000
>>> 20 2.718281828459045 10174328183458584617/3742926166425600000
>>> 21 2.718281828459045
>>> 2916471173788403280463/1072909785605898240000
>>> 22 2.718281828459045 276616117600154259797/101761382761758720000
>>> 23 2.718281828459045
>>> 1616280548597592256096589/594596384994354462720000
>>> 24 2.718281828459045
>>> 525679049120391383123453/193386514825944760320000
>>> 25 2.718281828459045
>>> 20668549214802970026810601/7603534334966169600000000
>>> 26 2.718281828459045
>>> 4071822301311698255110413029/1497939712755963789312000000
>>
>> Nice. I was under the false impression that the numerator and denominator were
>> ever-increasing between the fractional terms.
>> Thanks for the web-cite.
>>
>> Dan
>
> By the way, what is with all odd denominators and even numerators?
> Also, the numerators ending in zero(s) from the 5th term on?
its the ! factor, multiplying the 2s,5s, and 0s the add up on the end,
most calculators do not show all the digits
>
> By far a smoother convergence then pi.
> Does the pattern in (e)'s CF have anything to do with it?
>
> (e) = a transcendental but maybe an Algebraic Irrational?
>
> Dan
>
[toc] | [prev] | [next] | [standalone]
| From | djoyce099 <hlauk.h.bogart@gmail.com> |
|---|---|
| Date | 2020-07-02 21:55 -0700 |
| Message-ID | <07d26b9d-f731-4f32-896b-5b235bd5f443o@googlegroups.com> |
| In reply to | #489585 |
On Thursday, July 2, 2020 at 11:15:34 PM UTC-4, djoyce099 wrote:
> On Thursday, July 2, 2020 at 10:41:24 PM UTC-4, djoyce099 wrote:
> > On Thursday, July 2, 2020 at 5:06:55 PM UTC-4, Chris M. Thomasson wrote:
> > > On 7/2/2020 2:00 PM, djoyce099 wrote:
> > > > On Thursday, July 2, 2020 at 1:43:25 AM UTC-4, James Waldby wrote:
> > > >> On Wed, 01 Jul 2020 11:29:49 -0700, djoyce099 wrote:
> > > >> ...
> > > >>> Here are the first 9 fractions depicting each step of the above formula.
> > > >>>
> > > >>> 9/3, 11/4, 49/18, 87/32, 1631/600, 11743/4320, 31967/11760,
> > > >>> 876809/322560, 8877691/3265920
> > > >>>
> > > >>> Factorial (9!) is used in determining the last fraction above.
> > > >>> The next term will use factorial (10!)
> > > >>> Also note all, even, odd ---numerator, denominator.
> > > >>>
> > > >>> Who can add to this list?
> > > >>
> > > >> On 27 June I posted python to print out terms of the series; see below.
> > > >>
> > > >> from fractions import Fraction
> > > >> def series(k):
> > > >> s = Fraction(9,3); fac = 1
> > > >> for i in range(2,k):
> > > >> print (f'{i-1:5} {float(s):<20.16} {s}')
> > > >> fac = fac*i
> > > >> s = s - Fraction(1,fac*i*(i-1))
> > > >> series(28)
> > > >>
> > > >> --
> > > >> jiw
> > > > James,
> > > >
> > > > Having problem with -- print (f'{i-1:5} {float(s):<20.16} {s}') <-- here
> > > > it highlights the last hyphen in that line }')
> > > >
> > > > Probably because I have an older version of Python
> > > > Python 2.6.6rel
> > > >
> > >
> > > Try Python 3:
> > >
> > > https://repl.it/languages/python3
> > >
> > > output:
> > >
> > > 1 3.0 3
> > > 2 2.75 11/4
> > > 3 2.722222222222222 49/18
> > > 4 2.71875 87/32
> > > 5 2.718333333333333 1631/600
> > > 6 2.718287037037037 11743/4320
> > > 7 2.71828231292517 31967/11760
> > > 8 2.718281870039683 876809/322560
> > > 9 2.718281831765628 8877691/3265920
> > > 10 2.718281828703704 4697191/1728000
> > > 11 2.718281828475957 1193556233/439084800
> > > 12 2.718281828460142 2232105163/821145600
> > > 13 2.718281828459112 2222710781/817689600
> > > 14 2.718281828459049 3317652307271/1220496076800
> > > 15 2.718281828459046 53319412081141/19615115520000
> > > 16 2.718281828459045 303328210950491/111588212736000
> > > 17 2.718281828459045 2348085347268533/863812325376000
> > > 18 2.718281828459045 313262209859119579/115242726703104000
> > > 19 2.718281828459045 42739099682215483/15722836107264000
> > > 20 2.718281828459045 10174328183458584617/3742926166425600000
> > > 21 2.718281828459045
> > > 2916471173788403280463/1072909785605898240000
> > > 22 2.718281828459045 276616117600154259797/101761382761758720000
> > > 23 2.718281828459045
> > > 1616280548597592256096589/594596384994354462720000
> > > 24 2.718281828459045
> > > 525679049120391383123453/193386514825944760320000
> > > 25 2.718281828459045
> > > 20668549214802970026810601/7603534334966169600000000
> > > 26 2.718281828459045
> > > 4071822301311698255110413029/1497939712755963789312000000
> >
> > Nice. I was under the false impression that the numerator and denominator were
> > ever-increasing between the fractional terms.
> > Thanks for the web-cite.
> >
> > Dan
>
> By the way, what is with all odd denominators and even numerators?
> Also, the numerators ending in zero(s) from the 5th term on?
>
> By far a smoother convergence then pi.
> Does the pattern in (e)'s CF have anything to do with it?
>
> (e) = a transcendental but maybe an Algebraic Irrational?
>
> Dan
Then there is this little gem -- (1+1/n)^n ~ e
Where n = 100,000,000 e~2.718281814867636... 7 correct digits of(e).
n =(9)digits long.
n= 1,000 digits long --- e correct too 1,000 digets
[toc] | [prev] | [next] | [standalone]
| From | Barry Schwarz <schwarzb@delq.com> |
|---|---|
| Date | 2020-07-03 07:51 -0700 |
| Message-ID | <e9huff9880e2mgm16g89k9u4f9mnamngof@4ax.com> |
| In reply to | #489585 |
On Thu, 2 Jul 2020 20:15:29 -0700 (PDT), djoyce099 <hlauk.h.bogart@gmail.com> wrote: <snip> >By the way, what is with all odd denominators and even numerators? >Also, the numerators ending in zero(s) from the 5th term on? If you look at the recursion formula I gave you, you will see why that is true starting with the second fraction. >(e) = a transcendental but maybe an Algebraic Irrational? e is irrational but not algebraic. That is kind of the definition of transcendental. -- Remove del for email
[toc] | [prev] | [next] | [standalone]
| From | djoyce099 <hlauk.h.bogart@gmail.com> |
|---|---|
| Date | 2020-07-03 08:30 -0700 |
| Message-ID | <38129fd6-99f4-48ce-ab47-20c61fc8017do@googlegroups.com> |
| In reply to | #489602 |
On Friday, July 3, 2020 at 10:51:03 AM UTC-4, Barry Schwarz wrote: > On Thu, 2 Jul 2020 20:15:29 -0700 (PDT), djoyce099 > wrote: > > <snip> > > >By the way, what is with all odd denominators and even numerators? > >Also, the numerators ending in zero(s) from the 5th term on? > > If you look at the recursion formula I gave you, you will see why that > is true starting with the second fraction. > > >(e) = a transcendental but maybe an Algebraic Irrational? > > e is irrational but not algebraic. That is kind of the definition of > transcendental. > > -- > Remove del for email I will have to study that more. Thanks
[toc] | [prev] | [next] | [standalone]
| From | Peter <peterxpercival@hotmail.com> |
|---|---|
| Date | 2020-07-03 16:30 +0100 |
| Message-ID | <rdnitt$fg5$2@gioia.aioe.org> |
| In reply to | #489585 |
djoyce > (e) = a transcendental but maybe an Algebraic Irrational? Since e is transcendental (I'm not sure why you put brackets round it) then it is not maybe algebraic.
[toc] | [prev] | [next] | [standalone]
| From | djoyce099 <hlauk.h.bogart@gmail.com> |
|---|---|
| Date | 2020-07-03 08:43 -0700 |
| Message-ID | <02ab9c21-fd8b-4abb-b098-8d8c9a020766o@googlegroups.com> |
| In reply to | #489606 |
On Friday, July 3, 2020 at 11:30:12 AM UTC-4, Peter wrote: > djoyce > > > (e) = a transcendental but maybe an Algebraic Irrational? > > Since e is transcendental (I'm not sure why you put brackets round it) > then it is not maybe algebraic. Ok. Is pi a much more complex transcendental than e? Comparing CF's where e has a pattern and pi has not. Like sqrt(2), an Algebraic Irrational, has all 2's after the initial 1 in its CF.
[toc] | [prev] | [next] | [standalone]
| From | Barry Schwarz <schwarzb@delq.com> |
|---|---|
| Date | 2020-07-03 11:42 -0700 |
| Message-ID | <fluuff14h43n767p6vcf75u9qkufdg33pk@4ax.com> |
| In reply to | #489608 |
On Fri, 3 Jul 2020 08:43:39 -0700 (PDT), djoyce099 <hlauk.h.bogart@gmail.com> wrote: >On Friday, July 3, 2020 at 11:30:12 AM UTC-4, Peter wrote: >> djoyce >> >> > (e) = a transcendental but maybe an Algebraic Irrational? >> >> Since e is transcendental (I'm not sure why you put brackets round it) >> then it is not maybe algebraic. > >Ok. >Is pi a much more complex transcendental than e? You need to define how you measure the complexity of a transcendental number. >Comparing CF's where e has a pattern and pi has not. I don't work with CFs but I wonder: Is there no pattern for pi or just one you have not yet recognized? >Like sqrt(2), an Algebraic Irrational, has all 2's after the initial 1 in its >CF. By the way, you need to be careful using the adjective "complex" with numbers. Neither pi nor e is a "complex number" as the term is normally used. -- Remove del for email
[toc] | [prev] | [next] | [standalone]
| From | djoyce099 <hlauk.h.bogart@gmail.com> |
|---|---|
| Date | 2020-07-03 14:03 -0700 |
| Message-ID | <d27e61b8-8de2-4ab0-8a39-a0464a378020o@googlegroups.com> |
| In reply to | #489614 |
On Friday, July 3, 2020 at 2:42:43 PM UTC-4, Barry Schwarz wrote: > On Fri, 3 Jul 2020 08:43:39 -0700 (PDT), djoyce099 > > > >On Friday, July 3, 2020 at 11:30:12 AM UTC-4, Peter wrote: > >> djoyce > >> > >> > (e) = a transcendental but maybe an Algebraic Irrational? > >> > >> Since e is transcendental (I'm not sure why you put brackets round it) > >> then it is not maybe algebraic. > > > >Ok. > >Is pi a much more complex transcendental than e? > > You need to define how you measure the complexity of a transcendental > number. > > >Comparing CF's where e has a pattern and pi has not. > > I don't work with CFs but I wonder: Is there no pattern for pi or just > one you have not yet recognized? > > >Like sqrt(2), an Algebraic Irrational, has all 2's after the initial 1 in its > >CF. > > By the way, you need to be careful using the adjective "complex" with > numbers. Neither pi nor e is a "complex number" as the term is > normally used. > > -- > Remove del for email I should have used chaotic instead of complex because there is no pattern t0 pi's CF like e CF that has a pattern. e^(i(pi))= -1 is a complex imaginary function on the complex plane
[toc] | [prev] | [next] | [standalone]
| From | Barry Schwarz <schwarzb@delq.com> |
|---|---|
| Date | 2020-07-03 15:46 -0700 |
| Message-ID | <n2dvff5oerj2v0u2c1dp8tfq3ids91b37v@4ax.com> |
| In reply to | #489623 |
On Fri, 3 Jul 2020 14:03:38 -0700 (PDT), djoyce099 <hlauk.h.bogart@gmail.com> wrote: >On Friday, July 3, 2020 at 2:42:43 PM UTC-4, Barry Schwarz wrote: >> On Fri, 3 Jul 2020 08:43:39 -0700 (PDT), djoyce099 >> >> >> >On Friday, July 3, 2020 at 11:30:12 AM UTC-4, Peter wrote: >> >> djoyce >> >> >> >> > (e) = a transcendental but maybe an Algebraic Irrational? >> >> >> >> Since e is transcendental (I'm not sure why you put brackets round it) >> >> then it is not maybe algebraic. >> > >> >Ok. >> >Is pi a much more complex transcendental than e? >> >> You need to define how you measure the complexity of a transcendental >> number. >> >> >Comparing CF's where e has a pattern and pi has not. >> >> I don't work with CFs but I wonder: Is there no pattern for pi or just >> one you have not yet recognized? >> >> >Like sqrt(2), an Algebraic Irrational, has all 2's after the initial 1 in its >> >CF. >> >> By the way, you need to be careful using the adjective "complex" with >> numbers. Neither pi nor e is a "complex number" as the term is >> normally used. >> >> -- >> Remove del for email > >I should have used chaotic instead of complex because there is no pattern >t0 pi's CF like e CF that has a pattern. > >e^(i(pi))= -1 is a complex imaginary function on the complex plane An imaginary number is a complex number without a real component. The compound adjective "complex imaginary" is not one I have ever heard used. (One could say a real number is a complex number without an imaginary component but I don't think anyone does.) -- Remove del for email
[toc] | [prev] | [next] | [standalone]
| From | "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> |
|---|---|
| Date | 2020-07-03 15:53 -0700 |
| Message-ID | <rdoct4$4lu$1@gioia.aioe.org> |
| In reply to | #489626 |
On 7/3/2020 3:46 PM, Barry Schwarz wrote: > On Fri, 3 Jul 2020 14:03:38 -0700 (PDT), djoyce099 > <hlauk.h.bogart@gmail.com> wrote: > >> On Friday, July 3, 2020 at 2:42:43 PM UTC-4, Barry Schwarz wrote: >>> On Fri, 3 Jul 2020 08:43:39 -0700 (PDT), djoyce099 >>> >>> >>>> On Friday, July 3, 2020 at 11:30:12 AM UTC-4, Peter wrote: >>>>> djoyce >>>>> >>>>>> (e) = a transcendental but maybe an Algebraic Irrational? >>>>> >>>>> Since e is transcendental (I'm not sure why you put brackets round it) >>>>> then it is not maybe algebraic. >>>> >>>> Ok. >>>> Is pi a much more complex transcendental than e? >>> >>> You need to define how you measure the complexity of a transcendental >>> number. >>> >>>> Comparing CF's where e has a pattern and pi has not. >>> >>> I don't work with CFs but I wonder: Is there no pattern for pi or just >>> one you have not yet recognized? >>> >>>> Like sqrt(2), an Algebraic Irrational, has all 2's after the initial 1 in its >>>> CF. >>> >>> By the way, you need to be careful using the adjective "complex" with >>> numbers. Neither pi nor e is a "complex number" as the term is >>> normally used. >>> >>> -- >>> Remove del for email >> >> I should have used chaotic instead of complex because there is no pattern >> t0 pi's CF like e CF that has a pattern. >> >> e^(i(pi))= -1 is a complex imaginary function on the complex plane > > An imaginary number is a complex number without a real component. The > compound adjective "complex imaginary" is not one I have ever heard > used. > > (One could say a real number is a complex number without an imaginary > component but I don't think anyone does.) > 0+1i and 1+0i are both complex numbers, and they are equal wrt their distance from origin, or their absolute value. However, one point is on the real line, and another is on the imaginary line.
[toc] | [prev] | [next] | [standalone]
| From | FromTheRafters <erratic@nomail.afraid.org> |
|---|---|
| Date | 2020-07-03 19:09 -0400 |
| Message-ID | <rdodrl$g9m$1@gioia.aioe.org> |
| In reply to | #489626 |
Barry Schwarz submitted this idea : > On Fri, 3 Jul 2020 14:03:38 -0700 (PDT), djoyce099 > <hlauk.h.bogart@gmail.com> wrote: > >> On Friday, July 3, 2020 at 2:42:43 PM UTC-4, Barry Schwarz wrote: >>> On Fri, 3 Jul 2020 08:43:39 -0700 (PDT), djoyce099 >>> >>> >>>> On Friday, July 3, 2020 at 11:30:12 AM UTC-4, Peter wrote: >>>>> djoyce >>>>> >>>>>> (e) = a transcendental but maybe an Algebraic Irrational? >>>>> >>>>> Since e is transcendental (I'm not sure why you put brackets round it) >>>>> then it is not maybe algebraic. >>>> >>>> Ok. >>>> Is pi a much more complex transcendental than e? >>> >>> You need to define how you measure the complexity of a transcendental >>> number. >>> >>>> Comparing CF's where e has a pattern and pi has not. >>> >>> I don't work with CFs but I wonder: Is there no pattern for pi or just >>> one you have not yet recognized? >>> >>>> Like sqrt(2), an Algebraic Irrational, has all 2's after the initial 1 in >>>> its CF. >>> >>> By the way, you need to be careful using the adjective "complex" with >>> numbers. Neither pi nor e is a "complex number" as the term is >>> normally used. >>> >>> -- >>> Remove del for email >> >> I should have used chaotic instead of complex because there is no pattern >> t0 pi's CF like e CF that has a pattern. >> >> e^(i(pi))= -1 is a complex imaginary function on the complex plane > > An imaginary number is a complex number without a real component. The > compound adjective "complex imaginary" is not one I have ever heard > used. > > (One could say a real number is a complex number without an imaginary > component but I don't think anyone does.) I have heard it said that a real number is one whose square is positive.
[toc] | [prev] | [next] | [standalone]
| From | FromTheRafters <erratic@nomail.afraid.org> |
|---|---|
| Date | 2020-07-03 15:22 -0400 |
| Message-ID | <rdo0hm$15uu$1@gioia.aioe.org> |
| In reply to | #489608 |
djoyce099 was thinking very hard : > On Friday, July 3, 2020 at 11:30:12 AM UTC-4, Peter wrote: >> djoyce >> >>> (e) = a transcendental but maybe an Algebraic Irrational? >> >> Since e is transcendental (I'm not sure why you put brackets round it) >> then it is not maybe algebraic. > > Ok. > Is pi a much more complex transcendental than e? > Comparing CF's where e has a pattern and pi has not. > Like sqrt(2), an Algebraic Irrational, has all 2's after the initial 1 in its > CF. You might enjoy this video. https://www.youtube.com/watch?v=zCFF1l7NzVQ Continued fractional expansion lecture from Gresham College.
[toc] | [prev] | [next] | [standalone]
| From | James Waldby <not@valid.invalid> |
|---|---|
| Date | 2020-07-03 05:18 +0000 |
| Message-ID | <rdmf3i$es6$2@dont-email.me> |
| In reply to | #489568 |
On Thu, 02 Jul 2020 14:00:48 -0700, djoyce099 wrote:
> On Thursday, July 2, 2020 at 1:43:25 AM UTC-4, James Waldby wrote:
>> On Wed, 01 Jul 2020 11:29:49 -0700, djoyce099 wrote:
>> ...
>> > Here are the first 9 fractions depicting each step of the above formula.
>> > 9/3, 11/4, 49/18, 87/32, 1631/600, 11743/4320, 31967/11760,
>> > 876809/322560, 8877691/3265920
>> >
>> > Factorial (9!) is used in determining the last fraction above.
>> > The next term will use factorial (10!)
>> > Also note all, even, odd ---numerator, denominator.
>> > Who can add to this list?
>>
>> On 27 June I posted python to print out terms of the series; see below.
>>
>> from fractions import Fraction
>> def series(k):
>> s = Fraction(9,3); fac = 1
>> for i in range(2,k):
>> print (f'{i-1:5} {float(s):<20.16} {s}')
>> fac = fac*i
>> s = s - Fraction(1,fac*i*(i-1))
>> series(28)
> Having problem with -- print (f'{i-1:5} {float(s):<20.16} {s}') <-- here
> it highlights the last hyphen in that line }')
>
> Probably because I have an older version of Python - Python 2.6.6rel
As Chris Thomasson noted, the program works ok with Python 3. I have
Python 3.6.9 installed. 3.7 might be available now. Python 2 doesn't
have f-strings formatting and because it was end-of-life'd last
January never will. <https://stackoverflow.com/a/46182112/837847>
mentions a workaround, or you can just replace the above print with:
print ('{:5} {:<20.16} {}'.format(i-1, float(s), s))
--
jiw
[toc] | [prev] | [next] | [standalone]
| From | djoyce099 <hlauk.h.bogart@gmail.com> |
|---|---|
| Date | 2020-07-03 06:14 -0700 |
| Message-ID | <3c86b72a-9abf-4560-b815-a5ada5c37309o@googlegroups.com> |
| In reply to | #489591 |
On Friday, July 3, 2020 at 1:18:48 AM UTC-4, James Waldby wrote:
> On Thu, 02 Jul 2020 14:00:48 -0700, djoyce099 wrote:
>
> > On Thursday, July 2, 2020 at 1:43:25 AM UTC-4, James Waldby wrote:
> >> On Wed, 01 Jul 2020 11:29:49 -0700, djoyce099 wrote:
> >> ...
> >> > Here are the first 9 fractions depicting each step of the above formula.
> >> > 9/3, 11/4, 49/18, 87/32, 1631/600, 11743/4320, 31967/11760,
> >> > 876809/322560, 8877691/3265920
> >> >
> >> > Factorial (9!) is used in determining the last fraction above.
> >> > The next term will use factorial (10!)
> >> > Also note all, even, odd ---numerator, denominator.
> >> > Who can add to this list?
> >>
> >> On 27 June I posted python to print out terms of the series; see below.
> >>
> >> from fractions import Fraction
> >> def series(k):
> >> s = Fraction(9,3); fac = 1
> >> for i in range(2,k):
> >> print (f'{i-1:5} {float(s):<20.16} {s}')
> >> fac = fac*i
> >> s = s - Fraction(1,fac*i*(i-1))
> >> series(28)
>
> > Having problem with -- print (f'{i-1:5} {float(s):<20.16} {s}') <-- here
> > it highlights the last hyphen in that line }')
> >
> > Probably because I have an older version of Python - Python 2.6.6rel
>
> As Chris Thomasson noted, the program works ok with Python 3. I have
> Python 3.6.9 installed. 3.7 might be available now. Python 2 doesn't
> have f-strings formatting and because it was end-of-life'd last
> January never will. <https://stackoverflow.com/a/46182112/837847>
> mentions a workaround, or you can just replace the above print with:
>
> print ('{:5} {:<20.16} {}'.format(i-1, float(s), s))
>
> --
> jiw
Thanks, James.
I am an antique-like my coding languages after all when introduced in the '70s
to gwbasic and prior to and after that IBM mainframe COBOL and RPG4 for the
IBM AS400. I retired from I.T. 20 years ago so now I need an update on Python.
Dan
[toc] | [prev] | [next] | [standalone]
| From | djoyce099 <hlauk.h.bogart@gmail.com> |
|---|---|
| Date | 2020-07-03 08:29 -0700 |
| Message-ID | <4aecfde7-3ea4-4427-ae1c-2005a3718790o@googlegroups.com> |
| In reply to | #489591 |
On Friday, July 3, 2020 at 1:18:48 AM UTC-4, James Waldby wrote:
> On Thu, 02 Jul 2020 14:00:48 -0700, djoyce099 wrote:
>
> > On Thursday, July 2, 2020 at 1:43:25 AM UTC-4, James Waldby wrote:
> >> On Wed, 01 Jul 2020 11:29:49 -0700, djoyce099 wrote:
> >> ...
> >> > Here are the first 9 fractions depicting each step of the above formula.
> >> > 9/3, 11/4, 49/18, 87/32, 1631/600, 11743/4320, 31967/11760,
> >> > 876809/322560, 8877691/3265920
> >> >
> >> > Factorial (9!) is used in determining the last fraction above.
> >> > The next term will use factorial (10!)
> >> > Also note all, even, odd ---numerator, denominator.
> >> > Who can add to this list?
> >>
> >> On 27 June I posted python to print out terms of the series; see below.
> >>
> >> from fractions import Fraction
> >> def series(k):
> >> s = Fraction(9,3); fac = 1
> >> for i in range(2,k):
> >> print (f'{i-1:5} {float(s):<20.16} {s}')
> >> fac = fac*i
> >> s = s - Fraction(1,fac*i*(i-1))
> >> series(28)
>
> > Having problem with -- print (f'{i-1:5} {float(s):<20.16} {s}') <-- here
> > it highlights the last hyphen in that line }')
> >
> > Probably because I have an older version of Python - Python 2.6.6rel
>
> As Chris Thomasson noted, the program works ok with Python 3. I have
> Python 3.6.9 installed. 3.7 might be available now. Python 2 doesn't
> have f-strings formatting and because it was end-of-life'd last
> January never will. <https://stackoverflow.com/a/46182112/837847>
> mentions a workaround, or you can just replace the above print with:
>
> print ('{:5} {:<20.16} {}'.format(i-1, float(s), s))
>
> --
> jiw
I downloaded Python 2.7.6 and used the above print line and it worked great
because the other did not work either.
What added code will increase the decimal expansion of (e) from the 16th term
on?
Do I need to import GMPY or is that now built-in?
Thanks,
Dan
[toc] | [prev] | [next] | [standalone]
| From | James Waldby <not@valid.invalid> |
|---|---|
| Date | 2020-07-04 04:12 +0000 |
| Message-ID | <rdovjm$es6$3@dont-email.me> |
| In reply to | #489605 |
On Fri, 03 Jul 2020 08:29:14 -0700, djoyce099 wrote:
> On Friday, July 3, 2020 at 1:18:48 AM UTC-4, James Waldby wrote:
>> On Thu, 02 Jul 2020 14:00:48 -0700, djoyce099 wrote:
>> > On Thursday, July 2, 2020 at 1:43:25 AM UTC-4, James Waldby wrote:
>> >> On Wed, 01 Jul 2020 11:29:49 -0700, djoyce099 wrote:
>> >> ...
>> >> > Here are the first 9 fractions depicting each step of the above formula.
>> >> > 9/3, 11/4, 49/18, 87/32, 1631/600, 11743/4320, 31967/11760,
>> >> > 876809/322560, 8877691/3265920
>> >> >
>> >> > Factorial (9!) is used in determining the last fraction above.
>> >> > The next term will use factorial (10!)
>> >> > Also note all, even, odd ---numerator, denominator.
>> >> > Who can add to this list?
>> >>
>> >> On 27 June I posted python to print out terms of the series; see below.
[snipped program]
>>
>> > Having problem with -- print (f'{i-1:5} {float(s):<20.16} {s}') <-- here
>> > it highlights the last hyphen in that line }')
>> >
>> > Probably because I have an older version of Python - Python 2.6.6rel
>>
>> As Chris Thomasson noted, the program works ok with Python 3. I have
>> Python 3.6.9 installed. 3.7 might be available now. Python 2 doesn't
>> have f-strings formatting and because it was end-of-life'd last
>> January never will. <https://stackoverflow.com/a/46182112/837847>
>> mentions a workaround, or you can just replace the above print with:
>>
>> print ('{:5} {:<20.16} {}'.format(i-1, float(s), s))
> I downloaded Python 2.7.6 and used the above print line and it worked great
> because the other did not work either.
> What added code will increase the decimal expansion of (e) from the 16th term
> on?
> Do I need to import GMPY or is that now built-in?
Importing from gmpy and using its functions is one way to get indefinite
precision decimal calculations, but the decimal package might be easier
to pick up on. For example:
from fractions import Fraction
from decimal import getcontext, Decimal
getcontext().prec = 33 # change 33 & 35 to set precision
def series(k):
s = Fraction(9,3); fac = 1
for i in range(2,k):
d = Decimal(s.numerator)/Decimal(s.denominator)
print ('{:5} {:<35} {}'.format(i-1, d, s))
fac = fac*i
s = s - Fraction(1,fac*i*(i-1))
print(' e {}'.format(Decimal(1).exp()))
Then series(17) produces:
1 3 3
2 2.75 11/4
3 2.72222222222222222222222222222222 49/18
4 2.71875 87/32
5 2.71833333333333333333333333333333 1631/600
6 2.71828703703703703703703703703704 11743/4320
7 2.71828231292517006802721088435374 31967/11760
8 2.71828187003968253968253968253968 876809/322560
9 2.71828183176562806192435822065452 8877691/3265920
10 2.71828182870370370370370370370370 4697191/1728000
11 2.71828182847595726383605171483959 1193556233/439084800
12 2.71828182846014153884524254894625 2232105163/821145600
13 2.71828182845911211295826680442065 2222710781/817689600
14 2.71828182845904908688355400373541 3317652307271/1220496076800
15 2.71828182845904544537701504191804 53319412081141/19615115520000
e 2.71828182845904523536028747135266
The last 3 lines of output from series(30) are:
27 2.71828182845904523536028747135267 799173430907446007531862987961/293999475161295508340736000000
28 2.71828182845904523536028747135266 7735209504091823085246673858783/2845624549709329364680704000000
e 2.71828182845904523536028747135266
--
jiw
[toc] | [prev] | [next] | [standalone]
| From | djoyce099 <hlauk.h.bogart@gmail.com> |
|---|---|
| Date | 2020-07-03 21:43 -0700 |
| Message-ID | <8557949b-3a2e-4cea-a530-39d17569ebd2o@googlegroups.com> |
| In reply to | #489649 |
On Saturday, July 4, 2020 at 12:12:47 AM UTC-4, James Waldby wrote:
> On Fri, 03 Jul 2020 08:29:14 -0700, djoyce099 wrote:
> > On Friday, July 3, 2020 at 1:18:48 AM UTC-4, James Waldby wrote:
> >> On Thu, 02 Jul 2020 14:00:48 -0700, djoyce099 wrote:
> >> > On Thursday, July 2, 2020 at 1:43:25 AM UTC-4, James Waldby wrote:
> >> >> On Wed, 01 Jul 2020 11:29:49 -0700, djoyce099 wrote:
> >> >> ...
> >> >> > Here are the first 9 fractions depicting each step of the above formula.
> >> >> > 9/3, 11/4, 49/18, 87/32, 1631/600, 11743/4320, 31967/11760,
> >> >> > 876809/322560, 8877691/3265920
> >> >> >
> >> >> > Factorial (9!) is used in determining the last fraction above.
> >> >> > The next term will use factorial (10!)
> >> >> > Also note all, even, odd ---numerator, denominator.
> >> >> > Who can add to this list?
> >> >>
> >> >> On 27 June I posted python to print out terms of the series; see below.
> [snipped program]
> >>
> >> > Having problem with -- print (f'{i-1:5} {float(s):<20.16} {s}') <-- here
> >> > it highlights the last hyphen in that line }')
> >> >
> >> > Probably because I have an older version of Python - Python 2.6.6rel
> >>
> >> As Chris Thomasson noted, the program works ok with Python 3. I have
> >> Python 3.6.9 installed. 3.7 might be available now. Python 2 doesn't
> >> have f-strings formatting and because it was end-of-life'd last
> >> January never will. <https://stackoverflow.com/a/46182112/837847>
> >> mentions a workaround, or you can just replace the above print with:
> >>
> >> print ('{:5} {:<20.16} {}'.format(i-1, float(s), s))
>
> > I downloaded Python 2.7.6 and used the above print line and it worked great
> > because the other did not work either.
> > What added code will increase the decimal expansion of (e) from the 16th term
> > on?
> > Do I need to import GMPY or is that now built-in?
>
> Importing from gmpy and using its functions is one way to get indefinite
> precision decimal calculations, but the decimal package might be easier
> to pick up on. For example:
>
> from fractions import Fraction
> from decimal import getcontext, Decimal
> getcontext().prec = 33 # change 33 & 35 to set precision
> def series(k):
> s = Fraction(9,3); fac = 1
> for i in range(2,k):
> d = Decimal(s.numerator)/Decimal(s.denominator)
> print ('{:5} {:<35} {}'.format(i-1, d, s))
> fac = fac*i
> s = s - Fraction(1,fac*i*(i-1))
> print(' e {}'.format(Decimal(1).exp()))
>
> Then series(17) produces:
>
> 1 3 3
> 2 2.75 11/4
> 3 2.72222222222222222222222222222222 49/18
> 4 2.71875 87/32
> 5 2.71833333333333333333333333333333 1631/600
> 6 2.71828703703703703703703703703704 11743/4320
> 7 2.71828231292517006802721088435374 31967/11760
> 8 2.71828187003968253968253968253968 876809/322560
> 9 2.71828183176562806192435822065452 8877691/3265920
> 10 2.71828182870370370370370370370370 4697191/1728000
> 11 2.71828182847595726383605171483959 1193556233/439084800
> 12 2.71828182846014153884524254894625 2232105163/821145600
> 13 2.71828182845911211295826680442065 2222710781/817689600
> 14 2.71828182845904908688355400373541 3317652307271/1220496076800
> 15 2.71828182845904544537701504191804 53319412081141/19615115520000
> e 2.71828182845904523536028747135266
>
> The last 3 lines of output from series(30) are:
> 27 2.71828182845904523536028747135267 799173430907446007531862987961/293999475161295508340736000000
> 28 2.71828182845904523536028747135266 7735209504091823085246673858783/2845624549709329364680704000000
> e 2.71828182845904523536028747135266
>
> --
> jiw
Just a little tweeking, nice.
[toc] | [prev] | [next] | [standalone]
Page 4 of 5 — ← Prev page 1 2 3 [4] 5 Next page →
Back to top | Article view | sci.math
csiph-web