Skip to content

Added Monte Carlo Implementation in TI-83 BASIC #553

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions contents/monte_carlo_integration/code/ti83basic/MONTE.TXT
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
"MONTE PROGRAMMED BY CODING WITH ETHANOL
ClrHome
Prompt M
0->C
0->I
StoreGDB 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The StoreGDB function changed between the TI-82 and TI-83. On an 82 this has to be StoreGDB GDB1 instead. Do these GDB vars still exist on the 83? If not, then we'll keep it like this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not familiar with how the GDB system works but I can confirm that those variables do still exist on my TI-84 Plus.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After checking an unofficial changelog, there is nothing to suggest that these variables wouldn't be on a TI-83 either.

ClrDraw
AxesOff
CoordOff
GridOff
LabelOff
0->Xmin:1->Xmax
0->Ymin:1->Ymax
Circle(0,0,1)
For(I,0,M,1)
::rand->X
::rand->Y
::Pt-On(X,Y)
::If ((X*X+Y*Y)<1)
::Then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see what you did here and I have to admit that it makes it slightly more readable on a PC screen, but I ran into the issue that ::Then breaks on my TI-82. Also, the colons make the line above long enough to be broken up into two, which decreases readability more than it's worth in my opinion. What do you think about getting rid of the colons?

::::C+1->C
::End
End
ClrHome
(C/M)*4->E
Text(28,43,E)
Pause
RecallGDB 0
ClrHome