that's where I got mine. Take out the parentheses before you enter the link, sorry, I don't have enough karma to post links.

]]>` ``:Repeat A :getKey→K :26-3iPart(.1Ans)+10fPart(.1Ans :Ans>0 and Ans≤9 or Ans=-2 :End`

It'll work for 0-9, but also for X², LOG, LN, X, -, +, and ENTER.

oops, ninja 'd

]]>EDIT: NEVER MIND I FOUND IT :D

]]>First search it up through the forums, then start a thread with a TI programming relevant title (please).

Wait. Is this because "Help again?" is not a good enough thread name, you mean? If so, so sorry!

]]>√528=4√33

√825=5√33

√528528=44√273

√825825=55√273

√528528528=12√3670337

√825825825=15√3670337

√528528528528=44√273000273

√825825825825=55√273000273

Woah.

It has to do with the fact that 528/825 = 16/25 but it's still quite amusing :D

AND, I think I'm going to add to my radicalsimplifier so that you can pick whether you want square-root, cube-root, 4th-root, 5th-root, and so on.

AND, I implemented the speedier version of the radicalsimplifier. The program is now

PROGRAM:ZSUBRAD

:2→A

:1→B

:0→D

**:1→H :If not(X)** or X=1:Then

:X→B

:1→X

:Goto A

:End

:If X<0:Then

:1→D

:-X→X

:End

:

:If not(fPart(X/A^2

:X/A^2→X

:AB→B

:Else

:

:2→H

:A-1→A

:End

:A+H→A

:End

:End

:int(log(B→E

:Lbl A

:Output(C,F,"+/-

:If B≠1 or B=1 and X=1 and D≠1

:Output(C,F+3,B

:If D=1:Then

:E+1→E

:End

:If X≠1:Then

:Output(C,F+4+E,"√

:Output(C,F+5+E,X

bolded parts are changes I made. Some of it is optimization, some of it is fixing typos from typing the code out onto here, and some of it is the new stuff to make it run faster.

` ``If fPart(HX/2:Then :2→H :A-1→A :End :A+H→A`

Directly above here is the code to make it faster. What it does is, if/once X is an odd number, it only tests odd numbers as potential factors because only an odd*odd is an odd. the HX prevents it from doing it over and over again though.

EDIT: took out the code font thing so that you'd be able to see bolds.

` ``:If B≠1 or B=1 and X=1 and D≠1`

the AND joins the B and the X statements so it's no always a tautology. ]]>

The brackets are only there for clarity, since otherwise it would look like a minus sign instead of a negative sign. ]]>

` ``:If fpart(X/2:Then :2→C :A+1→A :End A+C→A`

this would go after the AB→B part of the code. This way, instead of just increasing A by one each time, it switches the increment of increasing to 2 if X is an odd number, because no even factors would be able to be taken out of the odd number anymore.

But the next challenge! Once X is odd and the increment of increasing is 2, you don't need to keep checking if X is odd at that part because it will remain odd. So how can I take out that odd-checking bit of code once X is odd… I could just say if X is odd go to a new loop somewhere else doing that? But it seems like there'd be a shorter way to do it.

]]>will display √X instead of 1√X

except it will display 1 instead of √1 or 1√1

except if it is imaginary it will just display i with no 1

EDIT: switching my typed out "radical"s to √'s to make it easier to read now that I'm on the computer not on my iPod.

]]>` ``X/A^2=int(X/A^2`

Changes to:

` ``not(fPart(X/A²`

` ``If B≠1 or B=1`

Basically, you can remove that since B is always either going to be 1 or it won't be 1. ]]>

` ``PROGRAM:RADICAL :ClrHome :Disp ""," :"RADiCALSiMPLiFiERBY SiMBA→Str1 :For(A,1,7 :Output(1,A,sub(Str1,A,1 :End :For(B,1,10 :Output(2,B,sub(Str1,B+7,1 :End :For(C,1,8 :Output(C,16,sub(Str1,C+17,1 :End :Input "√(",X :4→C :2→F :If abs(X)>100 :Output(8,1,"CALCULATING... :Disp "= :prgmZSUBRAD :Output(8,1," " ____________ PROGRAM:ZSUBRAD :2→A :1→B :0→D :If X=0 or X=1:Then :X→B :1→X :Goto A :End :If X<0:Then :1→D :-X→X :End :Repeat X/A^2=int(X/A^2 :If X/A^2=int(X/A^2:Then :X/A^2→X :AB→B :Else :A+1→A :End :End :int(log(B→E :Lbl A :Output(C,F,"+/- :If B≠1 or B=1 and X=1 and D≠1 :Output(C,F+3,B :If D=1:Then :Output(C,F+4+E,"√ :Output(C,F+5+E,X`

I made the actual radical calculating part a different program so that I could implement it really easily into my distance formula program, pythagorean program, quadratic formula program, and any others I would need it for in the future. C and F are the coordinates for where the simplified radical is to be displayed in the program outside of ZSUBRAD. And… yeah! Any questions, comments, complaints, advice?

EDIT: also, I had to have the "Calculating" because it takes a long time for bigger numbers. Any answers on how to make it faster/what the fastest way to do it is?

` ``X If Ans Ans/abs(Ans`

Ans will be 1 for positive, 0 for 0, -1 for negative. ]]>

will return the number of digits of any natural number (over 0, 0 won't work and neither will negatives). ]]>

One new question from me!

What's the best way to get the number of digits of a [whole] number? What's the fastest way for a program to say how many digits a given number has? The only two ways to do this off the top of my mind was either a bunch of "if x>0 digits=1 if x>10 digits=2 *" and so on for positive and negative numbers

my second odea was so convert the number into a string and then use length( but there must be a better way.

The reason I'm wondering this is because of the radical simplifying program I'm making… I want it to be able to display 2radical5 or 1024radical2 all nicely without having spaces*

*sorry I don't have greater than/equal to or radical signs on my mobile device's keyboard

]]>Would Repeat max((B=16){A=7,B=8}) be faster or take up less space (or both or neither) than Repeat B=16 and A=7 or B=16 and B=8? ]]>

1) Wherever you ask a question really doesn't make a difference as long as you get the answers you want.

2) When you type Repeat (A=7 or B=8) and (B=16), the program looks at parenthesis first, so this is good if you want it to check the "or" condition first.

But, if you're trying to say something like…

Repeat B=16 and A=7 or B=16 and B=8, then you'd want to type…

Repeat max((B=16){A=7,B=8}). Now, for what you had put originally, you can get rid of the parenthesis around B=16, because they are unnecessary there.

3) Repeat (K=11 or K=15) or ((A=8 and (B=1 or B=2 or B=3 or B=4 or B=12 or B=13 or B=14 or B=15 or B=16)) and K=105) is the same as typing…

Repeat (K=11 or K=15) or (A=8 and K=105 and max(B={1,2,3,4,12,13,14,15,16})). See? Almost half as short. This is best when B could possibly be a decimal. But if B is guaranteed to be an integer, I'd use the other guys suggestion of using the < and > signs.

4) For that situation, use If max(K={24,25,26,34}) (assuming you're using K for the value of getKey), when determining whether to look at movement code.

Hope I've helped. Any questions? I'd be glad to clarify or help some more.

]]>Among logical operators, AND is given higher precedence than logical OR (unless parentheses tell otherwise)

This I had not known. Also, nice optimisation with abs()!

]]>A=8 or A=7 and B=16 is equivalent to A=8 or (A=7 and B=16), but not equivalent to (A=8 or A=7) and B=16.

For the likes of (A=6) and (B=2) or (C=8) and (D=3) or (E=1), these parentheses can be dropped altogether.

Chains of OR—(A=1 or A=3) or (A=5 or A=7)—don't need parentheses. Try experimenting similarly with AND.

In your program's individual context, the #3 can be shortened to K=11 or K=15 or K=105 and A=8 and 3<abs(B-8.

You may write Repeat Ans:getKey→K:End before the movement code to halt any activity until such time input is given.

The briefest conditional change we have is the Iverson bracket (although we use "( )" over "[ ]"): A-(K=24)+(K=26→A

]]>` ``Repeat (K=11 or K=15) or ((A=8 and (B=1 or B=2 or B=3 or B=4 or B=12 or B=13 or B=14 or B=15 or B=16)) and K=105)`

To something like this:

` ``Repeat K=11 or K=15 or (A=8 and K=105 and ((B≥1 and B≤4) or (B≥12 and B≤16`

When it comes to this kind of stuff, it may take a bit more time, but I try to reorganise the logic to get a smaller routine :)

]]>First search it up through the forums, then start a thread with a TI programming relevant title (please).

Question 2 answer

It is recommended to write it with parathases as the calculator reads it in normal math. If you put 1=1 and 2=1 or 3=3, the calculator will see what ever comes first if there are no parathases.

Question answer 3

Try something like

` ``(B>0 and B<5)`

Question answer 5:

I don't know how to respond but with repeat k=arrow:get key->k:end

1. if I have a question, is this the best way to ask it, by starting a thread with it? Or is there a place on the forums for questions? Or some other standard way people ask their coding questions?

2. if I want to say

` ``Repeat (A=8 or A=7) and (B=16)`

Is that the way to do it? Is the the typical way programmers write that, with the parentheses? BecauseI feel like there's ambiguity with writing it without the parentheses lest the calculator takes it as

` ``(A=8) or (A=7 and B=16)`

If that makes sense.

3. is there a nicer way I can say the following:

` ``Repeat (K=11 or K=15) or ((A=8 and (B=1 or B=2 or B=3 or B=4 or B=12 or B=13 or B=14 or B=15 or B=16)) and K=105)`

Without all of those parentheses and logic statements?

4. if I have a section of code something like

` ``:***movement code***`

in this particular program the movement code is only needed if an arrow key was pressed, but itching gets messed up if an arrow key wasn't pressed. Would it speed up the program or benefit at all if I changed it to

` ``:if K=arrow key:then :*movement code* :end`

Thank you!

]]>