* WalrusIRC

You need to have 5 posts and not be part of restricted usergroups in order to use the WalrusIRC embedded shoutbox. However, you can also access our IRC channel called #CodeWalrus via EFnet.

Author Topic: How I wish I could calculate pi...  (Read 1481 times)

0 Members and 1 Guest are viewing this topic.

Offline JWinslow23

  • Pi is the coolest number in the history of math. :\
  • Super User
  • CW 4x3 challenge - 2nd place
  • *
  • Join Date: May 2015
  • Location: Somewhere between 13 and Graham's Number
  • Posts: 735
  • Post Rating Ratio: +10/-1
  • Use pi! Pi is the absolute greatest! :(
    • @UCu_9qD95nADzc-W6RN-3Z8A
    • 113/11328
  • Gender: Male
How I wish I could calculate pi...
« on: March 25, 2016, 12:01:36 am »
...on my TI-83+ series of calculators.

Not to worry, though, Jeremy Gibbons and I have a solution for you!



Based on the findings in this mathematical paper, here is a TI-BASIC program that calculates one by one the digits of pi, with features such as:
    * Arbitrary precision arithmetic simulated through lists
    * An efficient decimal digit streaming algorithm
    * Adequately optimized code (will optimize more, though)
    * Author-verified to calculate more digits than he knows (and I know about 50 :P )
    * A hidden feature...see if you can find it ;)
    * insert other stuff here

Download attached. Also, see if you can find the Easter egg, for twice as much fun!

EDIT: I modified the program because the display didn't quite work on the color calculators. Download the new version if you haven't already.
« Last Edit: April 21, 2016, 02:21:12 pm by DJ Omnimaga »


  • Calculators owned: TI-84+, TI-84+ CSE, TI-84+ CE

Offline xlibman

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18428
  • Post Rating Ratio: +93/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: How I wish I could calculate pi...
« Reply #1 on: March 25, 2016, 12:02:50 am »
I notice in the screenshot that it stops at 18. I assume that you pressed a key to quit? Or does it just stop randomly? That would be weird :P Anyway, that is pretty cool.
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline JWinslow23

  • Pi is the coolest number in the history of math. :\
  • Super User
  • CW 4x3 challenge - 2nd place
  • *
  • Join Date: May 2015
  • Location: Somewhere between 13 and Graham's Number
  • Posts: 735
  • Post Rating Ratio: +10/-1
  • Use pi! Pi is the absolute greatest! :(
    • @UCu_9qD95nADzc-W6RN-3Z8A
    • 113/11328
  • Gender: Male
Re: How I wish I could calculate pi...
« Reply #2 on: March 25, 2016, 12:05:02 am »
I did press a key to quit. You could calculate as long as the memory allows for. On monochrome calcs, I believe this is near 500, and on the CE, I was able to calculate 900 before my battery ran out :P

Offline xlibman

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18428
  • Post Rating Ratio: +93/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: How I wish I could calculate pi...
« Reply #3 on: March 25, 2016, 12:08:50 am »
Don't you mean we can calculate as long as the batteries survive? :P One interesting trick would be to see how fast it is on the 84+CSE, while still keeping an eye on the battery indicator and charge the calculator every once in a while. I don't know if the calculator can charge while it's busy, though (if that's the case you could always add a Pause option, though). Another issue is that the 84+CSE and especially the 84+CE seem to run much slower when connected to USB.
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline JWinslow23

  • Pi is the coolest number in the history of math. :\
  • Super User
  • CW 4x3 challenge - 2nd place
  • *
  • Join Date: May 2015
  • Location: Somewhere between 13 and Graham's Number
  • Posts: 735
  • Post Rating Ratio: +10/-1
  • Use pi! Pi is the absolute greatest! :(
    • @UCu_9qD95nADzc-W6RN-3Z8A
    • 113/11328
  • Gender: Male
Re: How I wish I could calculate pi...
« Reply #4 on: March 25, 2016, 12:19:29 am »
Don't you mean we can calculate as long as the batteries survive? :P One interesting trick would be to see how fast it is on the 84+CSE, while still keeping an eye on the battery indicator and charge the calculator every once in a while. I don't know if the calculator can charge while it's busy, though (if that's the case you could always add a Pause option, though). Another issue is that the 84+CSE and especially the 84+CE seem to run much slower when connected to USB.
Well, also as long as memory allows. But in the case of the CE, the batteries run out long before that limit is reached.

Also, has anyone discovered the Easter egg? Anyone who's seen me in IRC knows what I'm talking about ;)

Offline xlibman

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18428
  • Post Rating Ratio: +93/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: How I wish I could calculate pi...
« Reply #5 on: March 25, 2016, 02:17:20 am »
I didn't since I didn't have time to try the program, but I'll load it on TilEm now.


EDIT: I can't find any easter egg :D (even in the source)
« Last Edit: March 25, 2016, 02:31:17 am by DJ Omnimaga »
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline JWinslow23

  • Pi is the coolest number in the history of math. :\
  • Super User
  • CW 4x3 challenge - 2nd place
  • *
  • Join Date: May 2015
  • Location: Somewhere between 13 and Graham's Number
  • Posts: 735
  • Post Rating Ratio: +10/-1
  • Use pi! Pi is the absolute greatest! :(
    • @UCu_9qD95nADzc-W6RN-3Z8A
    • 113/11328
  • Gender: Male
Re: How I wish I could calculate pi...
« Reply #6 on: March 25, 2016, 03:20:16 am »
EDIT: I can't find any easter egg :D (even in the source)
Oh, don't look in the source, my friend. Look in your heart. Or, more importantly, look at the number of radians of one full turn. Put it in your calculator, try and find that out.

Offline JWinslow23

  • Pi is the coolest number in the history of math. :\
  • Super User
  • CW 4x3 challenge - 2nd place
  • *
  • Join Date: May 2015
  • Location: Somewhere between 13 and Graham's Number
  • Posts: 735
  • Post Rating Ratio: +10/-1
  • Use pi! Pi is the absolute greatest! :(
    • @UCu_9qD95nADzc-W6RN-3Z8A
    • 113/11328
  • Gender: Male
Re: How I wish I could calculate pi...
« Reply #7 on: March 25, 2016, 05:56:10 pm »
Bump.

I updated the program to actually have compatibility with color calulators (I was a full 26 off for one number <_< ). Download the new version!

Offline xlibman

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18428
  • Post Rating Ratio: +93/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: How I wish I could calculate pi...
« Reply #8 on: March 26, 2016, 04:24:00 am »
Glad to see xolor compatibility. :)
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline JWinslow23

  • Pi is the coolest number in the history of math. :\
  • Super User
  • CW 4x3 challenge - 2nd place
  • *
  • Join Date: May 2015
  • Location: Somewhere between 13 and Graham's Number
  • Posts: 735
  • Post Rating Ratio: +10/-1
  • Use pi! Pi is the absolute greatest! :(
    • @UCu_9qD95nADzc-W6RN-3Z8A
    • 113/11328
  • Gender: Male
Re: How I wish I could calculate pi...
« Reply #9 on: March 26, 2016, 04:29:53 am »
Glad to see xolor compatibility. :)
Well, it had color compatibility in the first place (that's what that flash of the graph screen is, the color check), but I realized I was WAY off on one number, and that screwed up output on color calcs. Now you will be able to see all the digits formatted nicely :)

Offline xlibman

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18428
  • Post Rating Ratio: +93/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: How I wish I could calculate pi...
« Reply #10 on: April 06, 2016, 03:50:33 am »
Ah right, I forgot about that trick lol. I never needed it personally, since all my color games are exclusive to color calcs (in their current versions, that is), and same for monochrome calcs with monochrome games. Something I wonder if how far this pi calculator would get in TilEm or PindurTI (the fastest emulators IMHO) without speed throttling if they were left running overnight. PindurTI is a major PITA to send programs to, though, because they can only be sent to RAM and if the program has the Archive flag enabled then the emulator errors out.
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

 


You can also use the following HTML or bulletin board code to share it on your page or forum signature!


Also do not forget to check our affiliates below.
Planet Casio TI-Planet Calc.news BroniesQC BosaikNet Velocity Games