| Author |
Message |
|
KermMartian

Site Admin

Joined: 14 Mar 2005 Posts: 55736 Location: Earth, Sol, Milky Way
|
Posted: 25 Sep 2011 11:31:20 pm Post subject: |
|
|
Wow, this just clicked into place for me; it's almost exactly like a DJNZ type of instruction in assembly! Thanks for helping me make that conceptual leap.  _________________
 |
|
| Back to top |
|
|
Weregoose

Cemetech Expert

Joined: 23 Oct 2009 Posts: 463
|
|
| Back to top |
|
|
merthsoft
File Archiver

Joined: 09 May 2010 Posts: 2735
|
Posted: 26 Sep 2011 07:54:34 am Post subject: |
|
|
| Weregoose wrote: | | I can't think of a better way than using DS<( to determine which points belong to the Mandelbrot set. | Do you have any code for that? _________________ Shaun |
|
| Back to top |
|
|
Aes_Sedia5

Minor Calculator Deity

Joined: 01 Sep 2011 Posts: 1001 Location: Where Nightmares end and Dreams begin
|
Posted: 26 Sep 2011 08:42:22 am Post subject: |
|
|
No idea what that is but your welcome Kerm!!
I am confused on one thing. Does it add or subtrace one then test the variable .
For example
IS>(A,1)
Goto A
Goto B
Does it test if A = 1 then add 1 too it.
OR does it add 1 to A then Test if it equals 1. _________________

 |
|
| Back to top |
|
|
Weregoose

Cemetech Expert

Joined: 23 Oct 2009 Posts: 463
|
Posted: 26 Sep 2011 11:27:19 am Post subject: |
|
|
"IS>(A,B)" and "A+1→A:If A≤B" are interchangable. The first argument's variable is adjusted, then the comparison is performed.
| merthsoft wrote: | | Do you have any code for that? |
Code: :A+Bi→C
:While 2I≥abs(Ans
:DS<(I,1
:Ans²+C
:End
I is the recursion depth. Yet as I write this, I imagine that a fixed viewport would require one setting for I, and the recurrence can be expanded accordingly.
...NOPE. The expressions are too convoluted for I>3. _________________ Common Errors in English · How To Ask Questions The Smart Way |
|
| Back to top |
|
|
Deep Thought

Expert

Joined: 11 Mar 2010 Posts: 739 Location: The Universe
|
Posted: 19 Oct 2011 10:34:00 pm Post subject: |
|
|
My math teacher keeps using IS>( and DS<( as horrible replacements for For( loops. The only time I used them was with End as the next line, as a conditional for whether to cut the loop short or continue, but even for that there was a much better alternative (I can't remember what). _________________
  |
|
| Back to top |
|
|
KermMartian

Site Admin

Joined: 14 Mar 2005 Posts: 55736 Location: Earth, Sol, Milky Way
|
Posted: 20 Oct 2011 12:46:49 pm Post subject: |
|
|
| Deep Thought wrote: | | My math teacher keeps using IS>( and DS<( as horrible replacements for For( loops. The only time I used them was with End as the next line, as a conditional for whether to cut the loop short or continue, but even for that there was a much better alternative (I can't remember what). | Well, I firstly think that it's pretty cool that your math teacher writes TI-BASIC at all, but I agree that he needs to learn some more modernized coding style. Perhaps you should convince him to come visit us here at Cemetech, or at least to buy my book when it comes out! _________________
 |
|
| Back to top |
|
|
Aes_Sedia5

Minor Calculator Deity

Joined: 01 Sep 2011 Posts: 1001 Location: Where Nightmares end and Dreams begin
|
Posted: 20 Oct 2011 01:00:19 pm Post subject: |
|
|
OOOO. I might buy that book. It would be cool if you made an Ebook out of it also. _________________

 |
|
| Back to top |
|
|
KermMartian

Site Admin

Joined: 14 Mar 2005 Posts: 55736 Location: Earth, Sol, Milky Way
|
Posted: 20 Oct 2011 03:20:08 pm Post subject: |
|
|
| Aes_Sedia5 wrote: | | OOOO. I might buy that book. It would be cool if you made an Ebook out of it also. | I will indeed have an eBook of it, as far as I understand. I need to post news about my book soon; I'm just waiting to get the title and everything finalized and my publisher to post information about it. _________________
 |
|
| Back to top |
|
|
Aes_Sedia5

Minor Calculator Deity

Joined: 01 Sep 2011 Posts: 1001 Location: Where Nightmares end and Dreams begin
|
Posted: 20 Oct 2011 03:56:10 pm Post subject: |
|
|
ok I will definetly get a copy of it! _________________

 |
|
| Back to top |
|
|
KermMartian

Site Admin

Joined: 14 Mar 2005 Posts: 55736 Location: Earth, Sol, Milky Way
|
Posted: 21 Oct 2011 12:18:18 am Post subject: |
|
|
| Aes_Sedia5 wrote: | | ok I will definetly get a copy of it! | I'm very happy to hear it! But don't let me derail your discussion; let's get back to your specific questions. I'll have at least one thread for discussion, questions, and suggestions for my book. _________________
 |
|
| Back to top |
|
|
Deep Thought

Expert

Joined: 11 Mar 2010 Posts: 739 Location: The Universe
|
Posted: 22 Oct 2011 10:37:44 am Post subject: |
|
|
| KermMartian wrote: | | Deep Thought wrote: | | My math teacher keeps using IS>( and DS<( as horrible replacements for For( loops. The only time I used them was with End as the next line, as a conditional for whether to cut the loop short or continue, but even for that there was a much better alternative (I can't remember what). | Well, I firstly think that it's pretty cool that your math teacher writes TI-BASIC at all, but I agree that he needs to learn some more modernized coding style. Perhaps you should convince him to come visit us here at Cemetech, or at least to buy my book when it comes out! | Yeah, I was surprised he went into TI-BASIC at all, but before he showed us the stuff to type in he specifically told us not to give him any corrections or suggestions. I'm thinking he copied it from a website filled with some unfortunately convoluted code  _________________
  |
|
| Back to top |
|
|
KermMartian

Site Admin

Joined: 14 Mar 2005 Posts: 55736 Location: Earth, Sol, Milky Way
|
Posted: 22 Oct 2011 11:39:27 am Post subject: |
|
|
Aww, that's a disappointment. Maybe you could submit an anonymous suggestion that he come visit us here at Cemetech and learn more TI-BASIC? Actually, if you have some of his code, perhaps a Google search might help track down his source. _________________
 |
|
| Back to top |
|
|
Deep Thought

Expert

Joined: 11 Mar 2010 Posts: 739 Location: The Universe
|
Posted: 22 Oct 2011 11:48:31 am Post subject: |
|
|
I never did. It was some 500-byte program to calculate a Riemann sum and making my own version was too easy
But yeah, he used IS>( and DS<( with Goto and Lbl to simulate exactly what a For loop would do. _________________
  |
|
| Back to top |
|
|
KermMartian

Site Admin

Joined: 14 Mar 2005 Posts: 55736 Location: Earth, Sol, Milky Way
|
Posted: 22 Oct 2011 11:54:21 am Post subject: |
|
|
Very odd indeed, and a very assembly way to do things, as I realized above. I appreciate this thread for finally helping me get that.
Edit: Testing a SAX fix yet again.
Edit2: Jonimus/TheStorm testing a fix for DoorsCS _________________
 |
|
| Back to top |
|
|
Aes_Sedia5

Minor Calculator Deity

Joined: 01 Sep 2011 Posts: 1001 Location: Where Nightmares end and Dreams begin
|
Posted: 22 Oct 2011 01:10:55 pm Post subject: |
|
|
Actually deep thought I think I know exactly the program you are talking about. It jumped around alot and used IS and DS. My calc teacher used the same code for along time. Now he is using mine. _________________

 |
|
| Back to top |
|
|
TheStorm

NOU!

Joined: 26 Mar 2007 Posts: 2375
|
Posted: 22 Oct 2011 03:32:54 pm Post subject: |
|
|
Yeah it does make sense coming from assembly to do it this way. Tail recursion is much more common in assembly languages than higher level ones like Basic, well aside from do... while.
Edit: DoorsCS why you no work? _________________
"Always code as if the person who will maintain your code is a maniac serial killer that knows where you live" -Unknown
"If you've done something right no one will know that you've done anything at all" -Futurama
"Have a nice day, or not, the choice is yours." Tom Steiner
<Michael_V> or create a Borg collective and call it The 83+
<Michael_V> Lower your slide cases and prepare to be silent linked. Memory clears are futile. |
|
| Back to top |
|
|
|