Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 06-05-2006, 12:39 AM   #1 (permalink)
 
Ultra Techie

Join Date: Sep 2005

Posts: 638

tommyboy123x is on a distinguished road

Send a message via AIM to tommyboy123x
Default Ti Basic

im making some programs for school on my TI calculator in the BASIC code (the one you program directly onto the calculator). This program takes an equation like x^4+10x^3+35x^2+50x+24 and turn it into (x+1)(x+2)(x+3)(x+4)... like a "supercharged" quadratic formula.

Code:
solve(Y1,x,11)-->a
solve(Y1,x,10)-->b
solve(Y1,x,9)-->c
solve(Y1,x,8)-->d
.........
solve(Y1,x,-11)-->y

anyways, i get a bunch of possible numbers (using the "solve" function to get the x intercepts, which are the 1, 2, 3, and 4 in the simplified equation). But... when i do it i get something like (x+1)(x+3)(x+1)(x+2)(x+3)(x+4)(x+2)(x+4)(x+2)

so i have all the correct numbers, its just a matter of eliminating the repeated ones.

right now i have it as soemthing like "if a=b, don't output"... but then it doesnt check if a=j...

does anyone have an idea of how to check this on a large scale (If a=b, if a=c, if a=d.... if y=w) without actually writing it all out? i was thinking i can do something like replacing the variable... so then say d-->a, goto xx

lol, and sorry if this makes no sense.....
__________________

Some real (as in actual) surveys that pay money!
tommyboy123x is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On