Math Is Fun

MATHEMATICS, STATISTICS, MACHINE LEARNING


Post Reply
User avatar

Topic author
Kitaw
Posts: 22
Joined: Sun Sep 03, 2017 6:09 pm

The appearance of the Fibonacci sequence within the decimal expansion of the number provided below is quite fascinating. Run the code in Julia (online) and see for your self. The Fibonacci sequence is known for naturally occurring in various aspects of mathematics, art, biology, and other areas.

Code: Select all

setprecision(BigFloat, 10000)
fs=1/999999999999999999999998999999999999999999999999
fs

1.00000000000000000000000100000000000000000000000200000000000000000000000300000000000000000000000500000000000000000000000800000000000000000000001300000000000000000000002100000000000000000000003400000000000000000000005500000000000000000000008900000000000000000000014400000000000000000000023300000000000000000000037700000000000000000000061000000000000000000000098700000000000000000000159700000000000000000000258400000000000000000000418100000000000000000000676500000000000000000001094600000000000000000001771100000000000000000002865700000000000000000004636800000000000000000007502500000000000000000012139300000000000000000019641800000000000000000031781100000000000000000051422900000000000000000083204000000000000000000134626900000000000000000217830900000000000000000352457800000000000000000570288700000000000000000922746500000000000000001493035200000000000000002415781700000000000000003908816900000000000000006324598600000000000000010233415500000000000000016558014100000000000000026791429600000000000000043349443700000000000000070140873300000000000000113490317000000000000000183631190300000000000000297121507300000000000000480752697600000000000000777874204900000000000001258626902500000000000002036501107400000000000003295128009900000000000005331629117300000000000008626757127200000000000013958386244500000000000022585143371700000000000036543529616200000000000059128672987900000000000095672202604100000000000154800875592000000000000250473078196100000000000405273953788100000000000655747031984200000000001061020985772300000000001716768017756500000000002777789003528800000000004494557021285300000000007272346024814100000000011766903046099400000000019039249070913500000000030806152117012900000000049845401187926400000000080651553304939300000000130496954492865700000000211148507797805000000000341645462290670700000000552793970088475700000000894439432379146400000001447233402467622100000002341672834846768500000003788906237314390600000006130579072161159100000009919485309475549700000016050064381636708800000025969549691112258500000042019614072748967300000067989163763861225800000110008777836610193100000177997941600471418900000288006719437081612000000466004661037553030900000754011380474634642900001220016041512187673800001974027421986822316700003194043463499009990500005168070885485832307200008362114348984842297700013530185234470674604900021892299583455516902600035422484817926191507500057314784401381708410100092737269219307899917600150052053620689608327700242789322839997508245300392841376460687116573000635630699300684624818301028472075761371741391301664102775062056366209602692574850823428107600904356677625885484473810507049252476708912581411411405930102594397055221918455182579303309636633329861112681897706691855248316295261201016328488578177407943098723020343826493703204299739348832404671111147398462369176231164814351698201718008635835925499096664087184867000739850794865805193502836665349891529892378369837405200686395697571872674070550577925589950242511475751264321287522115185546301842246877472357697022053e-48

Source: Quest

User avatar

yaman
Posts: 86
Joined: Mon Sep 11, 2017 12:50 pm

እሚገርም ነው። ለማረጋገጥ ያክል በR እና Python ሞከርኩት፣ ውጤቱ ተመሳሳይ ነው።

Python

Code: Select all

from decimal import Decimal, getcontext
getcontext().prec = 10000
fs = Decimal(1) / Decimal('999999999999999999999998999999999999999999999999')
fs

R

Code: Select all

library(Rmpfr)
prec <- 10000
fs <- mpfr(1, prec) / mpfr('999999999999999999999998999999999999999999999999', prec)
print(fs)

"I have great faith in fools; self-confidence my friends call it." - Edgar Allan Poe


ZaraYaqob
Posts: 7
Joined: Sun Sep 03, 2017 12:55 pm

Interesting!

On a side note, here is why everyone should learn python, according to the IEEE Spectrum

"This year, Python doesn’t just remain No. 1 in our general “Spectrum” ranking—which is weighted to reflect the interests of the typical IEEE member—but it widens its lead. Python’s increased dominance appears to be largely at the expense of smaller, more specialized, languages. It has become the jack-of-all-trades language—and the master of some, such as AI, where powerful and extensive libraries make it ubiquitous. And although Moore’s Law is winding down for high-end computing, low-end microcontrollers are still benefiting from performance gains, which means there’s now enough computing power available on a US $0.70 CPU to make Python a contender in embedded development, despite the overhead of an interpreter. Python also looks to be solidifying its position for the long term: Many children and teens now program their first game or blink their first LED using Python. They can then move seamlessly into more advanced domains, and even get a job, with the same language."

Image

Attachments
ProgLang.png
ProgLang.png (53.86 KiB) Viewed 1118 times
Post Reply