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:
- 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.)
- A programmer
writing math/science should get to know the subject in detail, to make a program that has
many useful features.
- 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.)
- 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.
- 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.)
- 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
|
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: 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: 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
|
|
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
|
|
1 2 3 4 5
You can change the number of comments per page in Account Preferences.
|