Omnimaga

Calculator Community => TI Calculators => TI-BASIC => Topic started by: SirCmpwn on March 02, 2011, 02:59:18 pm

Title: Extra Detail Suite
Post 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).
Title: Re: Extra Detail Suite
Post by: Munchor on March 02, 2011, 03:02:24 pm
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!
Title: Re: Extra Detail Suite
Post by: DJ Omnimaga on March 02, 2011, 03:02:38 pm
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.
Title: Re: Extra Detail Suite
Post by: aeTIos on March 02, 2011, 03:03:51 pm
w00t, scout, that looks nice! did you made it for the 83plus series too?
Title: Re: Extra Detail Suite
Post by: SirCmpwn on March 02, 2011, 03:04:07 pm
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)
Title: Re: Extra Detail Suite
Post by: aeTIos on March 02, 2011, 03:06:18 pm
About a triangle solver, I have made it already. gotta upload it? just remove my name and insert your name or so *grin*
Title: Re: Extra Detail Suite
Post by: SirCmpwn on March 02, 2011, 03:07:14 pm
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.
Title: Re: Extra Detail Suite
Post by: aeTIos on March 02, 2011, 03:08:24 pm
It is graphical (YES) and it is fast
(YES!!!!!!) , it works always, has error checking (you can look at tha source if u want :))
Title: Re: Extra Detail Suite
Post by: SirCmpwn on March 02, 2011, 03:16:04 pm
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)
Title: Re: Extra Detail Suite
Post by: DJ Omnimaga on March 02, 2011, 03:46:14 pm
Hmm nice, triangles :D

I always wished I had this in math classes back in 2001-03.
Title: Re: Extra Detail Suite
Post by: JustCause on March 02, 2011, 03:48:37 pm
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.
Title: Re: Extra Detail Suite
Post by: DJ Omnimaga on March 02, 2011, 03:50:33 pm
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
Title: Re: Extra Detail Suite
Post by: SirCmpwn on March 02, 2011, 03:50:58 pm
Oh, don't you want the 30-second 1024 bit factoring program?
EDIT: Ninja'd
Title: Re: Extra Detail Suite
Post by: JustCause on March 02, 2011, 03:52:52 pm
Though I did make 16-bit RSA once. :)
Title: Re: Extra Detail Suite
Post by: DJ Omnimaga on March 02, 2011, 03:53:58 pm
Ah right, I remember that one, lol. :P
Title: Re: Extra Detail Suite
Post by: Xeda112358 on March 02, 2011, 04:16:25 pm
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.
Title: Re: Extra Detail Suite
Post by: meishe91 on March 02, 2011, 05:06:25 pm
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 :)
Title: Re: Extra Detail Suite
Post by: SirCmpwn on March 02, 2011, 05:07:16 pm
I'll post it later, I promise.
Title: Re: Extra Detail Suite
Post by: meishe91 on March 02, 2011, 05:08:19 pm
Sweet, thanks ;D

What math level though? You didn't say.
Title: Re: Extra Detail Suite
Post by: SirCmpwn on March 02, 2011, 05:09:13 pm
Sorry, Precalculus, although I can take requests ;) I'm a pretty smart person, you know
Title: Re: Extra Detail Suite
Post by: meishe91 on March 02, 2011, 05:14:03 pm
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).
Title: Re: Extra Detail Suite
Post by: program4 on March 02, 2011, 06:48:03 pm
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
Title: Re: Extra Detail Suite
Post by: aeTIos on March 03, 2011, 03:07:36 am
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:
Code: (Basic) [Select]
{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)

Title: Re: Extra Detail Suite
Post by: Xeda112358 on March 03, 2011, 03:22:04 am
He said he wasn't using that method, though... :P
Title: Re: Extra Detail Suite
Post by: aeTIos on March 03, 2011, 03:58:38 am
oh...
I'm curious!
Title: Re: Extra Detail Suite
Post by: AngelFish on March 03, 2011, 04:18:52 am
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.
Title: Re: Extra Detail Suite
Post by: SirCmpwn on March 03, 2011, 09:46:10 am
The LinReg one destroys the graph screen, so it's not an option.  I'll post my version when I have the chance.
Title: Re: Extra Detail Suite
Post by: SirCmpwn on March 03, 2011, 12:54:38 pm
Here's the routine:
Code: [Select]
: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
Title: Re: Extra Detail Suite
Post by: Xeda112358 on March 03, 2011, 01:10:34 pm
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
Code: [Select]
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
Title: Re: Extra Detail Suite
Post by: SirCmpwn on March 03, 2011, 01:12:49 pm
Is that tested?
EDIT: More optimized:
Code: [Select]
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.
Title: Re: Extra Detail Suite
Post by: Xeda112358 on March 03, 2011, 01:16:42 pm
No, I didn't test it, but I have made enough base converters that I am pretty sure that should work :)
Title: Re: Extra Detail Suite
Post by: SirCmpwn on March 03, 2011, 01:17:57 pm
If you look at my last edit, I explain why it wont actually work :(
Title: Re: Extra Detail Suite
Post by: Xeda112358 on March 03, 2011, 01:21:35 pm
Ah, okay... *oops*
Title: Re: Extra Detail Suite
Post by: SirCmpwn on March 03, 2011, 01:39:20 pm
Optimized to within an inch of its life:
Code: [Select]
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,"
Title: Re: Extra Detail Suite
Post by: Xeda112358 on March 03, 2011, 01:43:03 pm
I thought of that with the negative sign, too, but then I realised it put the negative at the end...
Title: Re: Extra Detail Suite
Post by: SirCmpwn on March 03, 2011, 01:43:35 pm
Yeah, I just found that out.  I'm thinking of how to fix it, this is why I originally used Z.
Code: [Select]
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
Title: Re: Extra Detail Suite
Post by: Xeda112358 on March 03, 2011, 01:53:57 pm
Ah, that last edit is larger than the original by 15 bytes...
Title: Re: Extra Detail Suite
Post by: SirCmpwn on March 03, 2011, 01:56:03 pm
But it doesn't use Z, which was the goal.
Title: Re: Extra Detail Suite
Post by: Xeda112358 on March 03, 2011, 02:07:05 pm
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
Title: Re: Extra Detail Suite
Post by: Runer112 on March 03, 2011, 02:38:26 pm
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:

Code: [Select]
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
Title: Re: Extra Detail Suite
Post by: Xeda112358 on March 03, 2011, 02:47:35 pm
Code: [Select]
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
Title: Re: Extra Detail Suite
Post by: SirCmpwn on March 03, 2011, 02:48:51 pm
* While Ans
:P
Title: Re: Extra Detail Suite
Post by: Xeda112358 on March 03, 2011, 02:49:28 pm
But then try zero... :P
Title: Re: Extra Detail Suite
Post by: Runer112 on March 03, 2011, 02:50:10 pm
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. :)
Title: Re: Extra Detail Suite
Post by: meishe91 on March 03, 2011, 02:54:44 pm
Dang it, I had just optimized it but you guys beat me...:P
Title: Re: Extra Detail Suite
Post by: alberthrocks on March 03, 2011, 03:10:43 pm
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.