Mathh v5.00 By Joel Thompson For the TI-89/TI-92+ Calculators. Part 1: Introduction This program is a "port" of a program that I made in TI-BASIC for my 86. I say "port" because just the idea is the same; most of the code is a complete rewrite (except for the pascal's triangle part - I borrowed code from that and adapted it). Part 2: Information This program was written entirely in C with TIGCC. Instead of writing my own math code, I used the calc's internal CAS routines. I know that they could be improved upon, but they are good enough for me. This program is Nostub (no kernels required). It has been exe-packed with TIGCC, using programs by Thomas Nussbaumer. To run it, you need approximately 25k free ram. If you don't you will get a "Low Ram" error. You can enter anything in the dialog boxes as long as it is a valid expression in the entry line. NOTE: YOU MUST CLOSE PARENTHESIS, OTHERWISE IT WILL THROW AN ERROR. I could probably write a routine to do that for you, but I'm not going to do that. Also, it can be a max of 19 characters long. Part 3: Installation Send the files mathh.89y and mathh.89z to your calculator. mathh.89y will appear as matdat.ppg. It MUST be in your current folder to use the included launcher. If you want to use Tom's generic launcher, it can be anywhere. The other file, the launcher, can be anywhere. To uninstall, simply delete both files. Part 4: Running the program To run the program, simply type [nameoffolderthatmathhisin]\mathh() on the home screen, where nameoffolderthatmathhisin is the folder that the mathh.89z file is in. You will see a menu. Part 5: The Variations menu The first menu item is for variations. Press f1 to get to it, and choose the type of variation that you want. It will show you the formula that is used for that type of variation. A pop-up menu will come up and ask for what variable you want to solve. Move the cursor on your choice, and press enter. A dialog box will come up, prompting you to enter the variables. Enter them, and it will show what the variable is (but it will say x=). Press a key, and it will go back to the menu. Part 6: The Parabolas menu There are two options in this menu: The x-intercept option and the vertex option. To find the x-intercept(s) of a quadratic equation (and the equation in the quadratic formula), choose this option. It will show you the format of the equation, and a dialog box will come up, promptin you for the values. Enter the values, and press enter. It will show the equation set uop in the quadratic formula. Press a key, and and it will show the approximate solutions. For the vertex, the format is similar to the above, but instead of showing the equation set up in the quadratic formula, it will show the x and y coordinates of the vertex (both approximate and exact). Part 7: The Pythagorean Theorem menu This menu is for the pythagorean theorem, where a^2+b^2=c^2. Choose the value to solve for, and it will prompt you for the other lengths in a dialog box. Enter the values, and press enter. The solution will be shown in both exact and approximate mode. Part 8: The Lines Menu This menu presents a variety of forumlae for use with lines. They are detailed below: Use slope to calculate slope. The format will be shown, and a dialog box will come up, promting you for the values. Enter the values, and the program will show you the slope in both exact and approximate mode. Use distance to calculate distance between two points. The format is similar to the one above. Use midpoint for calculating the midpoint between two points. The format is similar to the one above. Use convert to convert to slope-intercept form (y=mx+b). The format is similar to the one above. Use equation to find the equation of two points. The format is similar to the one above. Part 9: The Pascal's Triangle Menu This part is for calculating the rows of Pascal's Triangle. A dialog box will pop up, and it will calculate the row of Pascal's which you have specified. It will display the row in a list. Use left and right to scroll, and use enter to continue. Part 10: The Logarithm Menu This menu is for calculating logarithms. A popup menu will popup to ask for what to solve. Use up and down to choose the variable, and use enter to select. A dialog box will come up, prompting you for the values of the known variables. Press enter, and the missing value will be shown in both exact and approx mode. Part 11: The Series Menu This menu is for calculating the nth term of a sequence or the sum of a series (geometric/arithmetic). "First Term" is the first term in the sequence/series. Difference is the Common difference in an arithmetic sequence (ie. the second term minus the first). Which term is what term you want to have. Last Term is the nth term in the series up to which you want to find the sum. The ratio is the common ration of a geometric sequence/series (ie. the seocnd term divided by the first term). (If you are wondering, a sequence is a bunch of numbers, a series is the sum of a sequence). Part 12: Thanks Thanks to Zeljko Juric for TIGCCLib and the doc, I "borrowed" some of his example code. Before writing this code, I knew virtually nothing about TIGCC. Thanks to Sebastian Riechelt for the IDE, and the rest of the TIGCC team for TIGCC (tigcc.ticalc.org). Thanks to Thomas Nussbaumer for his TIGCC Tools Suite (tict.ticalc.org). Thanks to theJLL (the1JLL@aol.com) for some help on the program. Thanks VERY, VERY much to Rusty for VTI (www.graphics-studio.net). Also, thanks to myself, because I copied and pasted a lot of my code (no use in redoing a lot of the groundwork:). Part 13: Legalese (C) 2001-2003 Joel Thompson. The author (I/me) makes no warranty (express or implied) about the fitness or merchantibility of this program. (Note that some states have laws expressly giving the user (you) specific rights about the merchanibilty or fitness of the program. If that is the case, you may have legal rights which you wouldn't otherwise have. Check with you state attorney general.) I have tried to make this porgram as error free as possible, but I can not be held responsible about anything that this program does to your calculator. By using the program or viewing any file other that this file included in the .zip file, you expressly waive your right to sue me for any reason related to these file. This program and all files included in this zip are copyrighted 2001-2003 by me (Joel Thompson). You may copy and redistribute the original .zip file as long as you give credit to me. If you use any routines from this program, also give credit to me, and please consider releasing the source (it's not a requirement). However, remember that, if you use something from this program, you only used it b/c this program is open source, and you should return the favor to the TI community. Part 14: Various sizes of the program compiled with various switches Here you can see the sizes of the program with the optimization switches shown and then compressed with ttppggen (for version 4.50). -O size = 21485 compressed = 6809 -O1 size = 21485 compressed = 6810 -O2 size = 21225 compressed = 6998 -O3 size = 21257 compressed = 8805 -Os size = 21225 compressed = 6947 -O0 size = 31393 compressed = 7125 Part 15: Contact Information Joel Thompson joelt49 AT yahoo DOT com www.geocities.com/joelt49 Part 16: Furure possibilities Add conic section stuff, maybe trig stuff, and storing results to the home screen Part 17: Version History Version History:8/13/01: Project started v.2b 8/15/01 Variations finished v.4b 8/18/01 Parabolas finished v.5b 8/18/01 Pythagorean Theorem Finished v.7b 8/19/01 Lines Finished v.79b 8/21/01 Pascal's Triangle finished, just some problems with calling it v.99b 8/21/01 Logs finished. Made all pushed vars volatile. v1.0b 8/22.01 Figured out how to make Pascal's Triangle not crash. Made the vars global, ititalized them all to 0, made prog >24k. v1.0 8/22/01 Made all vars local except the int array result. If local, prog crashes:( Although all the uncompressed sizes are over 24k, compressed sizes are still within about 20b of having result local. Not bad. v1.1 8/23/01 First publically released version. Checked to see if the requested row was in the range for the storage array. v1.2 8/25/01 Second publically released version. Made the result array local, allocated space with malloc (so enough size), and saved about 69 bytes in compressed state. v1.5 9/2/01 Publically released. Changed int* result to unsigned long *result, file size same. v2.0 9/11/01 Publically released. Fixed bug which crashed when Pascal's triangle row was used (changed result = malloc (row * sizeof (int)); to result = calloc (row + 1, sizeof (int);). Some internal changes (see the source). v3.0 3/23/02 Publically released. Implemented new argument engine so you can pass anything to a dialog box (except Pascal's triangle), and it will take it as an argument. Nothing else new, but that took a while. Yeah, this prog was laying dormant on my HD for about 6 months before I did anything with it, but I finally got (probably) the best improvement made :). v3.5 3/29/02 Publically Releasesd. Added some code to make sure the handles got freed, and changed the display routine in slope. v3.60 3/31/02 Publically Released. I tried to find where I did something like push_quantum (x); push_quantum (y); and changed it to push_quantum_pair (x,y);.Changed the code a little to accomodate a longer __VEROFPROGRAM__ macro and center it more. I also did some changes, instead of using the pseudo-constants LCD_WIDTH and TI92PLUS, I made little vars for them to try to make program shorter. Added some comments to the source in the little start-up animation. v4.00 4/23/02 Publically Released. First, and most important, I added the series stuff. You can find the nth term of an arithmetic or geometric sequence, find the sum of n terms of an arithmetic or geometric series, or find the sum of an infinite geometric series. Note: if r >= 1, the result will be infinity. Also, I changed the code around a bit. Instead of arrays for the individual results from dialogs, they are now pointers to the correct spot in the original arry. This (hopefully) saves a bit of memory and time. I also upped the max number of characters that can be entered from 8 to 19. Also, in TIGCC v.94B13, POW_TAG has been left out of the Tags Enum; to fix this, I added the last 3 lines of declerations.h v4.50 11/28/02 Publically Released. Added some stuff to the series menu: You can now find what n, r, and d are from knowledge of the other variable. Also added #define SET_FILE_IN_USE_BIT b/c this program uses dialog boxes which call the event loop which deletes the launcher's twin symbol if the launcher was archived. Changed all int's to short's. Added support (theoretically) for the V200. Used #define ENABLE_ERROR_RETURN instead of the try blocks. Fixed spelling of declarations. v5.00 8/1/03 Publically Released. Added option to store result in home screen history, with exact as entry and approx as answer. Also, if the result was too big to display, automatically store in home screen history. Removed check for no slope (ie, a vertical line) b/c 1: The check as written was buggy, and 2: Division by 0 results in "undef" which suits our purposes. Major code improvements (I've learned a lot about C and TIGCC since starting this project). Now uses F-line ROM calls for size purposes with an internal F-line emulator to maintain compatibility AMS 1.01