Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Python programming project

  1. Top | #1
    Senior Member excreationist's Avatar
    Join Date
    Aug 2000
    Location
    Australia
    Posts
    562
    Archived
    4,886
    Total Posts
    5,448
    Rep Power
    71

    Python programming project

    From "Metaphysics > Base 6 the magic base" post 22:

    https://talkfreethought.org/showthre...l=1#post673695

    In the novel "Contact" by Carl Sagan there is a hidden message encoded in PI in base 11:
    She find a long string of 1's and 0's late in the expansion of Pi in base 11. It's length is a product of two primes, indicating a two dimensional array. So, she plots it on her computer screen (each digit representing a pixel) and sees a perfect circle. The constant which describes the ratio of a circle's circumference to its diameter itself contains a picture of a circle!

    I heard that Tau is superior to Pi (tau = 2 PI)
    https://en.wikipedia.org/wiki/Turn_(...#Tau_proposals


    Then I thought the base should be base 36:
    https://en.wikipedia.org/wiki/Senary...ry_compression


    (Math.PI*2).toString(36) [in the javascript console]


    = 6.a70akmheav


    hmmmm kind of interesting... I'll see if I can get more characters


    https://pythonhosted.org/bigfloat/


    "...arbitrary-precision floating-point reliable arithmetic...."
    Here is how to convert integers to Base 36 in Python:
    https://en.wikipedia.org/wiki/Base36...implementation

    I was wondering if someone could help convert 2PI (Tau) into Base 36 as floating point so I can see what happens after 6.a70akmheav

    edit:
    I noticed that I could shift the decimal place by multiplying by 36...

    (2*pi*(36**14)).toString(36)

    = 6a70akmheaw0000 (the zeroes would be from the limited precision)

    edit:

    The Wikipedia link about Base 36 conversion in Python can handle hundreds of digits....

    https://docs.python.org/3/library/math.html

    Looks like there is math.tau in python 3.6
    Last edited by excreationist; 05-09-2019 at 10:53 AM.

  2. Top | #2
    Veteran Member
    Join Date
    Dec 2010
    Location
    Riverside City
    Posts
    3,318
    Archived
    6,289
    Total Posts
    9,607
    Rep Power
    36
    Quote Originally Posted by excreationist View Post
    From "Metaphysics > Base 6 the magic base" post 22:

    https://talkfreethought.org/showthre...l=1#post673695

    In the novel "Contact" by Carl Sagan there is a hidden message encoded in PI in base 11:
    She find a long string of 1's and 0's late in the expansion of Pi in base 11. It's length is a product of two primes, indicating a two dimensional array. So, she plots it on her computer screen (each digit representing a pixel) and sees a perfect circle. The constant which describes the ratio of a circle's circumference to its diameter itself contains a picture of a circle!

    I heard that Tau is superior to Pi (tau = 2 PI)
    https://en.wikipedia.org/wiki/Turn_(...#Tau_proposals


    Then I thought the base should be base 36:
    https://en.wikipedia.org/wiki/Senary...ry_compression


    (Math.PI*2).toString(36) [in the javascript console]


    = 6.a70akmheav


    hmmmm kind of interesting... I'll see if I can get more characters


    https://pythonhosted.org/bigfloat/


    "...arbitrary-precision floating-point reliable arithmetic...."
    Here is how to convert integers to Base 36 in Python:
    https://en.wikipedia.org/wiki/Base36...implementation

    I was wondering if someone could help convert 2PI (Tau) into Base 36 as floating point so I can see what happens after 6.a70akmheav

    thanks!
    Did you say floating point?

    Anything that happens beyond 6.a70akmheav will be rounded off with standard floating point numbers.

    You may have better luck with the arbitrary precision `Decimal` number format.

    Or better yet maybe, derive the value in base 36 to start with based on formula like https://en.wikipedia.org/wiki/Vi%C3%A8te%27s_formula or some such - since any decimal representation you may start with is an approximation too.

  3. Top | #3
    Senior Member excreationist's Avatar
    Join Date
    Aug 2000
    Location
    Australia
    Posts
    562
    Archived
    4,886
    Total Posts
    5,448
    Rep Power
    71
    Quote Originally Posted by Jokodo View Post
    Did you say floating point?

    Anything that happens beyond 6.a70akmheav will be rounded off with standard floating point numbers.
    https://pythonhosted.org/bigfloat/
    says "...arbitrary-precision floating-point reliable arithmetic...."
    Note it includes const_pi()

    You may have better luck with the arbitrary precision `Decimal` number format.
    Hmmm....
    https://docs.python.org/2/library/decimal.html

    I tried this:
    >>> from decimal import *
    >>> Decimal('1.000000000000000000000000000000000000000 00000000000000000000000000000000000000000001')
    and it works!

    Or better yet maybe, derive the value in base 36 to start with based on formula like https://en.wikipedia.org/wiki/Vi%C3%A8te%27s_formula or some such - since any decimal representation you may start with is an approximation too.
    Thanks for the ideas... I'm a beginner as far as python goes - I appreciate the help

  4. Top | #4
    Veteran Member
    Join Date
    Dec 2010
    Location
    Riverside City
    Posts
    3,318
    Archived
    6,289
    Total Posts
    9,607
    Rep Power
    36
    Quote Originally Posted by excreationist View Post
    Quote Originally Posted by Jokodo View Post
    Did you say floating point?

    Anything that happens beyond 6.a70akmheav will be rounded off with standard floating point numbers.
    https://pythonhosted.org/bigfloat/
    says "...arbitrary-precision floating-point reliable arithmetic...."

    You may have better luck with the arbitrary precision `Decimal` number format.

    Or better yet maybe, derive the value in base 36 to start with based on formula like https://en.wikipedia.org/wiki/Vi%C3%A8te%27s_formula or some such - since any decimal representation you may start with is an approximation too.
    Thanks for the ideas... I'm a beginner as far as python goes - I appreciate the help
    There's nothing python specific about floating point imprecision.

  5. Top | #5
    Senior Member excreationist's Avatar
    Join Date
    Aug 2000
    Location
    Australia
    Posts
    562
    Archived
    4,886
    Total Posts
    5,448
    Rep Power
    71
    Quote Originally Posted by Jokodo View Post
    There's nothing python specific about floating point imprecision.
    It seems to have arbitrarily long integers and decimals built in and python is a popular language so I thought we could focus on python.

  6. Top | #6
    Senior Member excreationist's Avatar
    Join Date
    Aug 2000
    Location
    Australia
    Posts
    562
    Archived
    4,886
    Total Posts
    5,448
    Rep Power
    71
    Ok I found the answer:

    https://www.wolframalpha.com/input/?i=pi+*+2+in+base+36

    BaseForm[Pi 2, 36]

    6.a70akmheavkkb2z4e50glko8fttz6kp732jzaih7nv8c3rx9 k2vjxmp09o5gvik5r2lse0oyd22a7e7yjz6abp5z614lft3wx3 do0cf1wjtbyryja937msrn1s4mcakpjf16j724dlmaogvuhkb7 fkufekd2ancyp5e6ygtxu8x4f9yldwzl0jab4d8qmqeyly8i37 e4dygl4l1afgvycm8jtzc8d7bogw480g1qch6ud8kkj05xpy1m 5dze4f32j6g4tgk3ts01f1ecfe0joffhefy6ior0k456trthif zvacdzlswcnpxtwu9iq8gwlh1wwgdnjlqqmcqhs6k8pwmh3gwa 325hg23abl36uts8rlttkpcwddb7um9sxf0pqvp7jk3up6p469 3086p4o53fz76yukic8fyxk0p2tubhx0qp3gjq5weh0p89ei97 4uqvmqnsrbdw0emsedrc3vq4im6hp5cm6rcaxc1r6yfyd07bbe twxbyltsuh5z2h8baxl3xb0owcrb8bgh4y56p10a1krikab06y alal0g6am01sn6fiu7jebi58qe9trnw8mcltylkxibzfl59v88 mv9wi4pw8tb6w1y5djmg8vu2n6xauqn02ctw569nunaqn3wv1x 0h1opd7zliwjty4v81a38w7dfvosnxurzxhs21vdzvfttl88yd 602q0ki75awqwg9coywk6ywsnnaqymc8i4fcfoyp7zn32hqx66 t94fqv7vizqdp0lnmxw0vjoy8disu27qmoogv806w87hj1mrcb n66c8io28xpsskz2b784zsu40j1rhr4be2o8yxw0t7rs6xjvs7 728ucv2gscma6oegxazlekp4uz0jbpwg9lhd0a6c8afs6i3jtr mskdeoqbrry4dzfzdh1tkjhq7yg554npac3tc0b09xkz4nvi2q w6c1go1anxzb353qtnwmmmtd0fvpeumqcc7jfn1148jgrb0ll6 xg4z82ifiwvww0jph07q3el8y

  7. Top | #7
    Veteran Member
    Join Date
    Dec 2010
    Location
    Riverside City
    Posts
    3,318
    Archived
    6,289
    Total Posts
    9,607
    Rep Power
    36
    Quote Originally Posted by excreationist View Post
    Ok I found the answer:

    https://www.wolframalpha.com/input/?i=pi+*+2+in+base+36

    BaseForm[Pi 2, 36]

    6.a70akmheavkkb2z4e50glko8fttz6kp732jzaih7nv8c3rx9 k2vjxmp09o5gvik5r2lse0oyd22a7e7yjz6abp5z614lft3wx3 do0cf1wjtbyryja937msrn1s4mcakpjf16j724dlmaogvuhkb7 fkufekd2ancyp5e6ygtxu8x4f9yldwzl0jab4d8qmqeyly8i37 e4dygl4l1afgvycm8jtzc8d7bogw480g1qch6ud8kkj05xpy1m 5dze4f32j6g4tgk3ts01f1ecfe0joffhefy6ior0k456trthif zvacdzlswcnpxtwu9iq8gwlh1wwgdnjlqqmcqhs6k8pwmh3gwa 325hg23abl36uts8rlttkpcwddb7um9sxf0pqvp7jk3up6p469 3086p4o53fz76yukic8fyxk0p2tubhx0qp3gjq5weh0p89ei97 4uqvmqnsrbdw0emsedrc3vq4im6hp5cm6rcaxc1r6yfyd07bbe twxbyltsuh5z2h8baxl3xb0owcrb8bgh4y56p10a1krikab06y alal0g6am01sn6fiu7jebi58qe9trnw8mcltylkxibzfl59v88 mv9wi4pw8tb6w1y5djmg8vu2n6xauqn02ctw569nunaqn3wv1x 0h1opd7zliwjty4v81a38w7dfvosnxurzxhs21vdzvfttl88yd 602q0ki75awqwg9coywk6ywsnnaqymc8i4fcfoyp7zn32hqx66 t94fqv7vizqdp0lnmxw0vjoy8disu27qmoogv806w87hj1mrcb n66c8io28xpsskz2b784zsu40j1rhr4be2o8yxw0t7rs6xjvs7 728ucv2gscma6oegxazlekp4uz0jbpwg9lhd0a6c8afs6i3jtr mskdeoqbrry4dzfzdh1tkjhq7yg554npac3tc0b09xkz4nvi2q w6c1go1anxzb353qtnwmmmtd0fvpeumqcc7jfn1148jgrb0ll6 xg4z82ifiwvww0jph07q3el8y
    Is that rounded or truncated? Or is it the result of converting a rounded/truncated binary or decimal representation without properly accounting for its imprecision? You understand that since we're talking about representing an irrational number in an integer base, it cannot, in principle, be precise?

  8. Top | #8
    Senior Member excreationist's Avatar
    Join Date
    Aug 2000
    Location
    Australia
    Posts
    562
    Archived
    4,886
    Total Posts
    5,448
    Rep Power
    71
    Quote Originally Posted by Jokodo View Post
    Is that rounded or truncated? Or is it the result of converting a rounded/truncated binary or decimal representation without properly accounting for its imprecision? You understand that since we're talking about representing an irrational number in an integer base, it cannot, in principle, be precise?
    It isn't the full answer but it is long enough for now

  9. Top | #9
    Veteran Member
    Join Date
    Dec 2010
    Location
    Riverside City
    Posts
    3,318
    Archived
    6,289
    Total Posts
    9,607
    Rep Power
    36
    Quote Originally Posted by excreationist View Post
    Quote Originally Posted by Jokodo View Post
    Is that rounded or truncated? Or is it the result of converting a rounded/truncated binary or decimal representation without properly accounting for its imprecision? You understand that since we're talking about representing an irrational number in an integer base, it cannot, in principle, be precise?
    It isn't the full answer but it is long enough for now
    Long enough for what? For most practical purposes, your original answer is good enough, and a füll answer you'll Never get

  10. Top | #10
    Senior Member excreationist's Avatar
    Join Date
    Aug 2000
    Location
    Australia
    Posts
    562
    Archived
    4,886
    Total Posts
    5,448
    Rep Power
    71
    Quote Originally Posted by Jokodo View Post
    Quote Originally Posted by excreationist View Post
    It isn't the full answer but it is long enough for now
    Long enough for what?
    To see if there are any obvious messages

    For most practical purposes, your original answer is good enough,
    No the original answer had half a message - "heav..."

    and a füll answer you'll Never get
    In the Carl Sagan story there was a message in Pi and that was after a limited number of decimal places.

    BTW in 1/(2Pi) there is the word "scrum"
    https://talkfreethought.org/showthre...l=1#post673717

    Wolfram Alpha can show up to 1045 digits...

Similar Threads

  1. Some new programming languages
    By lpetrich in forum Computers and Technology
    Replies: 6
    Last Post: 04-17-2019, 02:36 AM
  2. Web Programming - Web Assembly?
    By lpetrich in forum Computers and Technology
    Replies: 4
    Last Post: 04-16-2019, 11:16 PM
  3. The Programming Thread
    By rousseau in forum Computers and Technology
    Replies: 120
    Last Post: 04-09-2019, 08:42 PM
  4. Python & the Law of Identity
    By Speakpigeon in forum Computers and Technology
    Replies: 32
    Last Post: 03-10-2019, 12:08 PM
  5. Metaphysical programming
    By DracoAstreus in forum Metaphysics
    Replies: 4
    Last Post: 08-02-2016, 03:24 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •