ticalc.org
Basics Archives Community Services Programming
Hardware Help About Search Your Account
   Home :: Community :: Articles :: Of Mice and Math Programs
Of Mice and Math Programs

Posted on 28 August 1998

The following text was written by S.T.L.:

Why'd I choose that title? I don't know, it sounded niftier than, "Of Mice and Math and Science Programs".

Anyways, it's late at night again, and I'm browsing through the ticalc.org archives. One thing I notice is that there is a serious deficiency of math/science programs in general, and a waaaay serious deficit of assembly math/science programs. Well, I know they can't be as popular as games, but they sure are darn useful. So, the basic idea of this article is that: Some changes need to be made in the way math/science programs are conceived and written.

Let me take the TI-85 TI-Basic Math program Diviz as an example. It tests numbers to see if they're prime. The author writes: "But this one is the fastest I've seen." Well, it's not that fast at all. (No offense intended to the programmer, it's great he wrote a math program.) The process Diviz uses is Baby Trial Divide. Without going into serious mathematical language here, there exists a better process called Wheel Factorization. Had the author studied Number Theory (the area of math involved with primes and such) a little, he'd at least know about that. It's pretty simple, I implemented it on my TI-85. There are of course even better things, but they can't be done on a TI-85. This example of deficient programming isn't restricted to one program. There are some triangle solving programs there, and some of them (all of them?) don't seem to know of the Law of Cosines, which would let them solve more triangles. It's also pretty simple, I implemented it on my TI-85.

Now, let's talk about Periodic Table programs. I *used* to have one on my TI-85. I also can't program one, since I'm assembly-illiterate. Yet I deleted it. Why? Because I do some heavy-duty work with chemistry, and I'm a precision fanatic. I want as much precision in the atomic masses as I can get. Thus I've gone back to using a paper table. *If* a TI-85 program that had 7+ decimal precision for atomic masses came out, it would be really useful.

Now, all this has led me to the opinion that math/science programmers have to know the subject they're doing in detail before they write a program, so that it is as detailed, as efficient, and as useful as possible. For example, I'm not bothering to upload my program TRI, because anyone can hack up that sort of thing in TI-BASIC, and may even be better than mine. I'm also probably not going to upload my program PRIME2. Why? Though it's pretty speedy for a TI-85, for the TI-92, there's something infinitely better that I couldn't ever make by myself. The TI-92 Number Theory library, the NTH, can be found at http://home1.gte.net/paulp/nth/ Now, I think ticalc.org should have a link to that. :-D

So, what's this all mean? Well, I've got some opinions on that. Namely:

  1. There need to be more math and science programs (both TI-BASIC and assembly) for all the TI calculators. (Granted, some cannot support the heavy-duty math sometimes required, as in the NTH. No other calculator (except the TI-89) could support that.)
  2. A programmer writing math/science should get to know the subject in detail, to make a program that has many useful features.
  3. Also, a programmer writing math/science should go to extremes to provide precision. (This mostly applies to science. I refuse to use a Periodic Table that gives Oxygen a mass of 16. I'll consider using a Periodic Table that gives Oxygen a mass of 15.9994.)
  4. A programmer writing math/science should get to know ways to implement the algorithms needed, in detail, to make an efficient and quick program. (This mostly applies to math.) If game programmers spend sleepless nights to speed up their games and shave off 11 bytes, then so can math/science programmers.
  5. Also, programs should be written so that they can be used as sub-programs, with no or little modification. For the case of the TI-92 (and 89) they should come in Function format, too. (This mostly applies to math programs. I did this for my program PRIME2, transforming it into PRIME3.)
  6. Programs should be made for really complicated things. Now, while programs that do (say) quadratic equations are useful in their own right for some/most people, there also exists a need for heavy-duty math and science. (Probably the NTH is the first attempt at this that I've seen. A look at the ticalc.org archives shows that most TI-BASIC math programs are for a 8th grade Algebra I audience. And the TI-BASIC science programs are for a medium high school level. And the assembly programs are few and far between.)

Well, anyone else have other suggestions?

  Reply to this item

Re: Of Mice and Math Programs
Blah Poop  Account Info

If you give me any ideas and math formulas and science formulas, i'll make programs with them.

Reply to this comment    16 January 2004, 17:46 GMT


Re: Re: Of Mice and Math Programs
Alfred Mühlleitner  Account Info

I have a suggestion:
There is a great assembler programm "The Trig Machine v3.6" for the ti82 and ti86. But it doesn't work on my Voyage 200 :-(

Why not make a version of this program for the TI89/92/V200??

Would be great!

Reply to this comment    13 April 2008, 19:39 GMT

Re: Article: "Of Mice and Math Programs"
Jason Noble
(Web Page)

Ok. I read this article, and immediately knew what I wanted to say. I agree that we need more Math and Science programs. The 85 ASM area has none. That's where I quit agreeing. The periodic table to 7 decmials? Do you realize that if you carried the weights out for every element to 7 places that would take 7*108=864 bytes of memory! I wouldn't want to waste that much space. Neither would most people I dont' think. If you would like to, then write your own program. I know some of you don't know how to program (or as you say "not very well") that's not a problem. I couldn't do a freakin' line of assembly a year ago. There are plenty of people here to teach you. This is a pretty friendly community, so instead of demanding that someone writes you programs, why don't you politely ask if someone could teach you how to program. I am reminded of an excellent quote:

Give a man a fish, he eats for a day; teach a man to fish and he eats for life.

Great words. Bear those in mind next time you NEED a program written.

Thanks for reading... :^)

Reply to this comment    19 June 1999, 08:21 GMT

Re: Article: "Of Mice and Math Programs"
Rob Hornick

I totally agree. I use a TI-82 and am not very good at programming (although I am decent in TI-BASIC.) I can't find ANY math programs worth using (no offense to anyone who writes them.) If they had more formulae then I might consider using them. But to download the Pythagorean Theorem? That's a waste of time.

Rob Hornick
First Post he he

Reply to this comment    29 August 1998, 01:46 GMT

Re: Article: "Of Mice and Math Programs"
me

Do you realize that not all of the programmers out there are in high level math or science courses? They can't put all of the things that other people might know into their programs. They probably programmed it to help them on a test. Don't try to discourage people from programming something because they don't know everything about it. It's good practice for other, better programs.
Another point about only making programs for complicated things. What might seem easy to some people *is* comlicated for others. Programs for simple things just eliminate steps in figuring out bigger problems where small steps are needed.
I do agree that there are more heavy duty programs needed. It would be really nice if people (like Kirk Meyer who wants to do useful stuff) could convert from Basic to Assembly to make them faster.

Reply to this comment    29 August 1998, 01:59 GMT

Re: Re: Article: "Of Mice and Math Programs"
djb

I totally agree, I think many of the simple programs are some of the ones I use the most. Even though I'm taking Calculus, I still use my quadratic formula program more than any other program. I'm not saying more advanced programs would not be helpful, I'm just saying fairly simple ones can be very useful.

Reply to this comment    29 August 1998, 04:44 GMT


quadratic formula programs
JT

I don't know about the other TI calcs, but the TI-86 has a polynomial equation solver built in. Just press [2nd][PRGM] (Poly) and then you can solve most any equation, from 1st degree (although you don't need a calculator for it) on up.

Reply to this comment    8 October 1998, 22:48 GMT


Re: quadratic formula programs
Stefan Fausch

Yeah. Both the 85 and 86 have that poly function. Most people don't realize that half the functions they use on a daily basis (like the quadratic formula) are build in to the calculator. Why not use the calc's build in function instead of an slower asm or much slower basic program? People should take more time reading the manuals to learn what capabilities their calcs have instead of whining. Anyway, I too wrote lots of little programs for my algebra 2 and precalc classes ranging from law of sins and cosines, hyperbolas and lots of other stuff, and I never published them on this site or any other because of the code hacking problem.

Reply to this comment    13 October 1998, 23:57 GMT

Re: Re: Article: "Of Mice and Math Programs"
S.T.L.

I didn't say that programs should ONLY be made for complex things. But there should be more complex programs out there. For example, I'm in the International Baccalaureate program, which is a heavy-duty advanced high school program. I'm in the IB Math Methods II class, which is equivalent to Calculus II. I'd love to make good calculus programs, etc, but I don't do assembler. Perhaps it would be a good idea if someone could convert TI-Basic programs into assembly. :-D

Reply to this comment    29 August 1998, 06:26 GMT

Re: Re: Re: Article: "Of Mice and Math Programs"
me again

Well, even if you don't do assembler you can still release a program in basic. I'm sure that no one will complain. I released a couple calc programs for the 86, such as a volume of revolution that shows the picture, and nobody complained at all. It might not of been much, but it helped on the AP Calc test and I hope it helps someone else in the future.

Reply to this comment    29 August 1998, 20:28 GMT

Re: Re: Re: Article: "Of Mice and Math Programs"
Red Raida
(Web Page)

No offens SLT, but you dont seem to understand how hard assembler is. You have limited variables to use, and only one can do certain functions, like subtract :-(. assembler is also hard to learn caus most tutorials dont explain it too much caus the authors know it well

example prog

#include "ti86asm.inc"

.org _asm_exec_ram

call _clrLCD ; clear the screen
ld hl, $0000 ; stores $00 in h, $00 in l
ld (_curRow),hl ; stores 0 in _curRow, 0 in _curCol
ld hl, Hard ; hl points to string Hard
call _puts ; print the string
ld a, '!' ; load ! character in A
call _putc ; print '!'
call _newline ; go to next line
ret ; return from program

Hard:
.db "Assembler is Hard",0

.end

plus that you need to have a compiler to translate it into hexadecimal or compiled hex
so, many people who know assembler (i do not know it, i just sort of copied that prog) dont want to make math progs caus it would be HARD with so limited variables

Reply to this comment    6 September 1998, 06:13 GMT

Re: Re: Re: Article: "Of Mice and Math Programs"
Red Raida
(Web Page)

No offens SLT, but you dont seem to understand how hard assembler is. You have limited variables to use, and only one can do certain functions, like subtract :-(. assembler is also hard to learn caus most tutorials dont explain it too much caus the authors know it well

example prog

#include "ti86asm.inc"

.org _asm_exec_ram

call _clrLCD ; clear the screen
ld hl, $0000 ; stores $00 in h, $00 in l
ld (_curRow),hl ; stores 0 in _curRow, 0 in _curCol
ld hl, Hard ; hl points to string Hard
call _puts ; print the string
ld a, '!' ; load ! character in A
call _putc ; print '!'
call _newline ; go to next line
ret ; return from program

Hard:
.db "Assembler is Hard",0

.end

look at all those routines!!! would take on line in basic. plus that you need to have a compiler to translate it into hexadecimal or compiled hex
so, many people who know assembler (i do not know it, i just sort of copied that prog) dont want to make math progs caus it would be HARD with so limited variables

Reply to this comment    6 September 1998, 06:14 GMT


Basic > Assembly
JT

Unless I'm mistaken, it says in the TI-86 manual that you can compile/compress/whatever BASIC programs into ASM.

Don't know about the other calcs though...

Reply to this comment    8 October 1998, 22:50 GMT

Re: Basic > Assembly
TI83Maniac  Account Info
(Web Page)

I am an extremely good math programmer, although, I am not that good at programming math programs in Z80 Assembly. I am making the ultimate math program right now, but I don't know how to convert it to Z80 Assembly, and if I did, then it would mean a lot to me, because that way my math program which takes up about 8,500 bytes, would run a lot quicker and would be a lot smaller.

Reply to this comment    21 November 1999, 07:15 GMT

Re: Basic > Assembly
Niten  Account Info

Well... you're close. What is listed in the manual is the function AsmComp(. This function will compile any text-format machine code into hex-format machine code, reducing its size to about 50% of the original. But the point is, for this function to work, an assembly program must be converted to some form of hex from assembly source code in the first place... so you really need an external program (or something like ZAC) to write assembly for the calculator, unless you're going to devote your life to memorizing z80 machine code...

Reply to this comment    10 March 2000, 22:03 GMT


Re: Basic vs. Assembly
Coolv  Account Info

YOU CAN ONLY COMPILE "TEXT" PROGRAMS INTO ASSEMBLY-NOT BASIC!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!

Reply to this comment    18 May 2004, 00:40 GMT


Re: Re: Article: "Of Mice and Math Programs"
snb  Account Info

Some people are luckier than others. I am not allowed to use my graphing calculator on tests or quizzes because my math teacher saw that I was using programs so now she allows no one to use them. My parents won't allow me to use it either because they consider it cheating. I get home at 5:30 with my math homework and 8 hours worth of homework from other subjects every night plus projects in most subjects. I have tons of fun.(sorry, I'm just feeling bad for myself)

Reply to this comment    24 March 2002, 21:59 GMT


Re: Re: Re: Article: Of Mice and Math Programs
Iamdalto Account Info

Tell your parents that things like a calculator cannot be evil or dishonest, only the attitude that the person applies. This is the sort of garbage that parents love.

Reply to this comment    15 August 2005, 20:37 GMT

Re: Article: "Of Mice and Math Programs"
Paul DeLeeuw

I have a small comment on the precission thing: It seems a little anal retentive to want atomic masses to the 8th decimal unless you are a Chem/Physics Doctorate working at NASA, but something I've found that accomodates such people is using a data table or matrix to store the information. That way, people who aren't super preceise can input 16 in for the mass of O, or 15.9994. An example, Michael Van Der Kolk and I wrote an atomic mass program that takes, say, "H2O" and breaks it into the formula 2*mass("H")+mass("O"). When it looked through the matrix, if it didn't find "O", it asked the user for the mass of O. The user then has the choice of which he wants to input, 16 or 15.9994. This saves the memory of storing the entire periodic table's worth of masses (How many people truely use Einsteinium in an equation?) while allowing flexibility for users.

Reply to this comment    29 August 1998, 02:23 GMT

Re: Article: "Of Mice and Math Programs"
JimmyPop

What we REALLY need are math program that dont just give you decimal answers. I have yet to see a math teacher that will let me write out decimal answers. They always want it in terms of Pi or in radical form. That means for every chapter I have to write my own programs to solve the equations...The only program I've seen that does this is Quadster, which shows you all the steps of solving a quadratic equation, and its fast too!

Reply to this comment    29 August 1998, 02:32 GMT

Re: Re: Article: "Of Mice and Math Programs"
mike

No offense at all, but to do that is (in my opinion) pointless...Anyone even using things like pi should know how to convert back...getting a number equal to 1.5(pi)...just divide by pi and you'd get 1.5. If someone lacks the basic math skills to do that they shouldn't be using a TI, but pencil and paper...

mike

Reply to this comment    29 August 1998, 03:47 GMT

Re: Re: Re: Article: "Of Mice and Math Programs"
Bruce Christensen
(Web Page)

Yes, but when you have many layers and functions (cos, pi, log, etc.), it gets much more difficult. Besides, sparing the step of dividing things back out can't hurt! :)

Reply to this comment    2 September 1998, 00:15 GMT

Re: Re: Re: Article: "Of Mice and Math Programs"
Matt

I think you are overlooking solutions like:
3(pi)^2, 2/(pi), e^(2*pi), etc...

Reply to this comment    29 April 1999, 20:35 GMT


Re: Re: Re: Article: "Of Mice and Math Programs"
Blah Poop  Account Info

oooooooooooooooh roast!

Reply to this comment    16 January 2004, 17:49 GMT

Re: Re: Article: "Of Mice and Math Programs"
dave

I agree that programs need to give answers in exact form, and the truth is, there are a fair number that do. The big problem is, its hard to tell which ones do and which ones don't without downloading and trying ever program. I got frustrated trying to find a good quadratic formula program, so I wrote one myself on my TI-83 (called "qadratic"). Somehow the math programs need to be described in enough detail so that it is possible to tell the quality of the program without having to download it. Another idea: have each program be rated.

Reply to this comment    29 August 1998, 04:38 GMT


Re: Re: Article: "Of Mice and Math Programs"
The Great aArdvark!
(Web Page)

There are plenty of programs out there that can convert decimals to other forms. One of the best I've seen is built into the larger TI-85 basic program, Graftbl. It converts decimals to fractions, whole numbers multiplied by pi, fractions multiplied by pi, and whole numbers and fractions containing square roots. It's also extremely fast (for basic), getting results involving values around 50 in under 10 seconds.

Reply to this comment    29 August 1998, 09:46 GMT

1  2  3  4  5  

You can change the number of comments per page in Account Preferences.

  Copyright © 1996-2010, the ticalc.org project. All rights reserved. | Contact Us | Disclaimer