Omnimaga
Calculator Community => TI Calculators => TI-BASIC => Topic started by: SirCmpwn on March 02, 2011, 02:59:18 pm
-
Hello,
So I never, ever do my math homework. I consider it a waste of time. For a while, my teacher tried using an iron fist, never accepting late work or offering extra credit. And my grades would suck. She would end up getting pissed off though, when I would ace her tests, and thus, avoid failing. However, we have recently struck up a deal. Every TI-Basic math program that I give her will count for one 100% homework assignment - provided they are better than the ones she already has.
With this in mind, I have started writing tons of TI-Basic math programs. And the angle I'm doing in order to surpass the quality of her exisiting ones is this: Extra Detail. What this means is that not only does each program give you the answer, it shows the work as well (or finds some other way of providing extra detail). I have completed a program already for calculating the Cross Product of two vectors that shows all of the work necissary to reach the answer. After finishing this, I started on a triangle solver program, which is about 50% complete. The only problem with these programs is that they take a while - the cross product one was a few hours of work.
Once I get a good number of these done, I'll release them in a bundle (they rely heavily on common subprograms).
-
OOOOhhh Like my program:
(http://www.ticalc.org/archives/files/ss/813/81322.gif)
http://www.ticalc.org/archives/files/fileinfo/432/43265.html (http://www.ticalc.org/archives/files/fileinfo/432/43265.html)
It shows all the work :)
Never saw it (good enough) for the 83+, nice Sir!
-
That seems interesting. Hopefully it might help some people. Just make sure they can't be used to cheat, though, or at least encourage in your readme to not cheat.
-
w00t, scout, that looks nice! did you made it for the 83plus series too?
-
Nice Scout! Yeah, the problem I'm facing is mostly spacing things out - "10" takes up twice the space of "1", but I still managed to arrange the matricies properly (which is why it took a long time).
I also put together a method of converting a number to a string without using LinReg (which messes up the graph screen).
DJ_O, it could be used for cheating, but it is mostly for clarifying a process. (Plus, I have to learn how to do all of this myself in order to implement it :P)
-
About a triangle solver, I have made it already. gotta upload it? just remove my name and insert your name or so *grin*
-
Is it graphical? The point of mine is that it is graphical - you just enter the known values on a graphical triangle and it shows the missing ones. And it works for non-right triangles.
-
It is graphical (YES) and it is fast
(YES!!!!!!) , it works always, has error checking (you can look at tha source if u want :))
-
Nice, it looks pretty cool :)
I think I'll make my own, though. I like the challenge.
Here's a screenie of the cross product program and the WIP triangle solver. (Yes, I know it's an impossible triangle :P)
-
Hmm nice, triangles :D
I always wished I had this in math classes back in 2001-03.
-
Cool. I wish I'd had these back when I was doing trig. Any chance you can make one for indefinite integration? :D :D :D <--- Joke. I realize this is nigh-impossible.
-
Cool. I wish I'd had these back when I was doing trig. Any chance you can make one for indefinite integration? :D :D :D <--- Joke. I realize this is nigh-impossible.
Your next request will be a 1024 bit TI-Nspire RSA key factorer for the calc, right? :P
-
Oh, don't you want the 30-second 1024 bit factoring program?
EDIT: Ninja'd
-
Though I did make 16-bit RSA once. :)
-
Ah right, I remember that one, lol. :P
-
Ah, cool, Sir! The most graphics I have used in a math program is this:
(http://www.ticalc.org/archives/files/ss/815/81539.gif)
I've never really worked on the graphics part of programs except in games... I think the reason is that I always worry about memory, so I prefer to keep the sizes small. Smaller sizes usually means less graphics.
-
Nemo has a triangle solver too somewhere around here...don't remember where though. What level math is this for?
Also, what is your method for turning a number into a string? I'm curious what it looks like :)
-
I'll post it later, I promise.
-
Sweet, thanks ;D
What math level though? You didn't say.
-
Sorry, Precalculus, although I can take requests ;) I'm a pretty smart person, you know
-
That's what I thought given the example you showed. Cool, maybe I'll make a couple if I can think of something (and actually take the time to go through my old pre-calculus notes :P).
-
Here is the link for a triangle solver (you have to delete all the code around the solver part, though). It's created by Deep Thought, and you might need his permission:
http://www.ticalc.org/archives/files/fileinfo/427/42769.html
-
Nemo has a triangle solver too somewhere around here...don't remember where though. What level math is this for?
Also, what is your method for turning a number into a string? I'm curious what it looks like :)
Number to string:
{0,1}->L1
{0,number}->L2
LinReg(ax+b) Y1 //// or any other y-var
Equ>String(Yvar,Str0)
sub(Str0,1,length(Str0)-3)->Str0
Now, you have the number in Str0 and can you use it!
(Thanks to TIBasicdev)
-
He said he wasn't using that method, though... :P
-
oh...
I'm curious!
-
Cool. I wish I'd had these back when I was doing trig. Any chance you can make one for indefinite integration? :D :D :D <--- Joke. I realize this is nigh-impossible.
Actually not ;)
About that Number->String routine, I sincerely hope it isn't the algorithm I'm thinking of, because that's an inefficient mess.
-
The LinReg one destroys the graph screen, so it's not an option. I'll post my version when I have the chance.
-
Here's the routine:
:Ans→A
" →Str0
A<0→Z
abs(A→A
While A
sub("0123456789",A-10int(A/10)+1,1)+Str0→Str0
int(A/10→A
End
sub(Str0,1,length(Str0)-1
If Z
"[negative]"+Ans
-
Here is a slight modification that saves a few bytes... I am going to try to come up with a more efficient version, but I'm pretty sure yours is most efficient at the moment :D
Ans→A
" →Str0
A<0→Z
abs(A→A
While A
int(A/10→A
sub("0123456789",A-10Ans+1,1)+Str0→Str0
End
sub(Str0,1,length(Str0)-1
If Z
"[negative]"+Ans
-
Is that tested?
EDIT: More optimized:
Ans→A
" →Str0
A<0→Z
abs(A→A
While A
int(.1A→A
sub("0123456789",A-10Ans+1,1)+Str0→Str0
End
sub(Str0,1,length(Str0)-1
If Z
"[negative]"+Ans
EDIT2: That won't actually work, because of A-10Ans, where A needs to be something different.
-
No, I didn't test it, but I have made enough base converters that I am pretty sure that should work :)
-
If you look at my last edit, I explain why it wont actually work :(
-
Ah, okay... *oops*
-
Optimized to within an inch of its life:
Ans→A
Ans<0
sub(" -",1+Ans,1→Str0
abs(A→A
While A
sub("0123456789",A-10int(.1A)+1,1)+Str0→Str0
int(.1A→A
End
sub(Str0,1,length(Str0)-(1=inString(Str0,"
-
I thought of that with the negative sign, too, but then I realised it put the negative at the end...
-
Yeah, I just found that out. I'm thinking of how to fix it, this is why I originally used Z.
Ans→A
Ans<0
sub(" -",1+Ans,1→Str0
abs(A→A
While A
sub("0123456789",A-10int(.1A)+1,1)+Str0→Str0
int(.1A→A
End
If inString(Str0,"-
"-"+Str0→Str0
sub(Str0,1,length(Str0)-1
-
Ah, that last edit is larger than the original by 15 bytes...
-
But it doesn't use Z, which was the goal.
-
Okay, I cannot think of any better ways, and yeah, that makes sense. You save 18 bytes of RAM by not using a real var, so really you lost 3 bytes :D
-
Original routine using Z: 94 bytes
Routine without using Z: 110 bytes
This routine I just made that doesn't use Z and handles the zero case correctly: 92 bytes :hyper:
Ans→A
" →Str0
A
Repeat Ans=0
Ans→A
sub("0123456789",abs(A-10iPart(.1A))+1,1)+Str0→Str0
iPart(.1A
End
Str0
If A<0
"⁻"+Ans
sub(Ans,1,length(Ans)-1
-
Ans→A
" →Str0
A
Repeat not(Ans
Ans→A
sub("0123456789",abs(A-10iPart(.1A))+1,1)+Str0→Str0
iPart(.1A
End
Str0
If A<0
"⁻"+Ans
sub(Ans,1,length(Ans)-1
:P
-
* While Ans
:P
-
But then try zero... :P
-
Ah right, my TI-BASIC skills are quite rusty so I didn't see that potential for optimizing to not(. But I got the general idea down well. :)
-
Dang it, I had just optimized it but you guys beat me...:P
-
One of the ideas I've had before was an ultimate Axe calculator/convertor, in which you could have either compilable or separate plugins. Those plugins specify categories, and have access to a minimal GUI library, in which you could make quite a bit of converters and calculators in Axe! ;) Unfortunately, Axe isn't very good at floating point math (aka no decimals), and I'm not too sure how to approach it.