# Ti Nspire --My first program

• May 9th 2008, 09:42 PM
hercules
Ti Nspire --My first program
Ti Nspire finally has some programming capabilities with the latest operating system upgrade. The program editor is accessible through the 1.calculator option (press menu and choose 8 then 1). Nspire doesn't come with any documentation about programming.

Here is my first program. THE HORRENDOUS QUADRATIC FORMULA (wish i had this calculator during beginning of High School)

Define LibPub qdratic(a,b,c)=
Prgm
Disp "+ root =", $\frac{-b+ \sqrt{(b^2)-4*a*c}}{2*a}$
Disp "- root =", $\frac{-b- \sqrt{(b^2)-4*a*c}}{2*a}$
EndPrgm

*note you must save this in myLib folder for it to be accessible via command line

Simple Enough

if you save the file as eqn then
Calculator entry line is eqn\qdratic(a,b,c)

Well the reasoning behind this post was simple enough - I am hoping other people will share their programs ...now that this calculator is finally capable. As you can see many tedious calculations can be made easy even on the non-CAS version of the calculator with little code. The CAS version can do all of calculus but it is not allowed on any exams so not worthwhile for most students.

[hey i learned some latex commands too whoohoo]
• May 19th 2008, 05:53 PM
airyie
I'm confused. Is this a program to mimic a graphing calculator?
• Nov 6th 2008, 10:34 AM
Haagen Dazs
Quote:

Originally Posted by hercules
Ti Nspire finally has some programming capabilities with the latest operating system upgrade. The program editor is accessible through the 1.calculator option (press menu and choose 8 then 1). Nspire doesn't come with any documentation about programming.

Here is my first program. THE HORRENDOUS QUADRATIC FORMULA (wish i had this calculator during beginning of High School)

Define LibPub qdratic(a,b,c)=
Prgm
Disp "+ root =", $\frac{-b+ \sqrt{(b^2)-4*a*c}}{2*a}$
Disp "- root =", $\frac{-b- \sqrt{(b^2)-4*a*c}}{2*a}$
EndPrgm

*note you must save this in myLib folder for it to be accessible via command line

Simple Enough

if you save the file as eqn then
Calculator entry line is eqn\qdratic(a,b,c)

Well the reasoning behind this post was simple enough - I am hoping other people will share their programs ...now that this calculator is finally capable. As you can see many tedious calculations can be made easy even on the non-CAS version of the calculator with little code. The CAS version can do all of calculus but it is not allowed on any exams so not worthwhile for most students.

[hey i learned some latex commands too whoohoo]

Hi hercules, i'm from portugal and i've just bought the nspire, and i was very surprised when finding out that it had no quadratic formula. When i saw you post i went right away to do the thing. I've don it just has you say, but when tiping for example: blabla eqn/... (5,3,7) it says: too many componets, (it says "argumentos", wich stands for letters os things in english, do you think you can help me? regards
• Nov 6th 2008, 07:32 PM
hercules
Thanks for bringing this up....I just realized that I forgot to mention something. I am going to repeat a few things.
ok...first use the program editor to create and save the following file:

Define LibPub qdratic(a,b,c)=
Prgm
Disp "+ root =", http://www.mathhelpforum.com/math-he...d721e9c3-1.gif
Disp "- root =", http://www.mathhelpforum.com/math-he...7d315589-1.gif
EndPrgm

*note you must save this in myLib folder for it to be accessible via command line

if you save the file as eqn then
Calculator entry line is eqn\qdratic(a,b,c)

****It seems \ is not one of the keys on the calculator.
So what you do is click on the key with Book drawn on it - It is right underneath the CLEAR key. Then click 5 and you will see your program listed there ...select it and a command line will appear in the calculator screen...there type in your a,b,c in the paranthesis given.

I hope this is clear. Let me know if you have any questions.

Note: after you save the file. You can always go to HOME then Documents then Open your file and work in the split screen of the program.
• Nov 6th 2008, 07:37 PM
hercules
This program will give you an error message "non-real calculation" if (b^2)-4ac is negative because you will be taking the square-root of a negative number.
• Nov 7th 2008, 06:35 AM
Haagen Dazs
Quote:

Originally Posted by hercules
This program will give you an error message "non-real calculation" if (b^2)-4ac is negative because you will be taking the square-root of a negative number.

No im sorry but the thing wit say's its rong its the amount of something that i dont remember, because ive found how to find the thing on the book before you said it here but when i tipe for exemple : (2,3,1) it says that is has to many smth that i don't recall, do you jnow wahts the problem?
• Jan 23rd 2009, 02:50 PM
GoD_oF_rEaSoN
Excellent!!!
Thanks for your help. The program works great in the Nspire CAS. After keying it in and correcting a few syntax errors on my part, it works great.

The only problem I encountered was checking the syntax and storing the program before I ran it; this can be accomplished by pressing, ctrl and then B after the program is entered.

Overall, this is a very useful piece of information. Thanks again.
• Feb 9th 2009, 08:03 PM
hercules
No Prob. ur welcome, God Of Reason.
Just a small request:
Could you please post any programs that you create on this forum too? Thanks!

Note: There is computer software for Ti-Nspire that you can download and try out for 30 days; you can create and test programs on it too. ...Makes it easy to copy paste.
• Feb 10th 2009, 07:43 PM