Re: solve.bin update
- From: "John H Meyers" <jhmeyers@xxxxxxxxxxxxxx>
- Date: Thu, 19 Jul 2007 20:10:23 -0500
On Thu, 19 Jul 2007 15:25:39 -0500, Ed wrote:
I was able to get the program solve.bin transfered to the HP48g
using hyperterminal. After accomplishing this much I pressed the solve
button on the variable menu and got the errror message -over errror,
Bad Argument Value. Now I am guessing that I do not know the proper
form to enter the necessary data to get it to work. Although this has
been made unnecessary because, after all these years of owning my 48g
32k I discovered the right-shift solve equation menu which does
everything I wanted to do, that is after I learned how to enter an
equation into solve equation. But now, if I may, I would like to ask
if there is a minimum number of free bytes necessary to run a program
after loading and installing the program. The reason I ask this is
because I have available between five and six thousand bytes now free
and all is working fine but I wish to install another program, a game
program that will only leave me between eight hundred to one thousand
bytes of free memory. Will this be enough free memory to run programs?
If after PICT PURGE the result of MEM is less than 1000 bytes,
then that's not enough room for a screen image for a graph,
nor for most "form-based" applications (just starting the
"Solve equation" form seems to take around 3000 bytes);
OTOH, I've run a program which displays any size string
in "pages," and that has run with less than 200 bytes free.
You can always make a backup to your computer,
then load up your game and see what happens;
most cases that demand lots of memory
just produce an "Insufficient memory" error,
but in cases where you're near the last few free bytes,
a Very Low Memory (VLM) procedure starts to ask you
whether you want to delete args, turn off "Last stack,"
delete stuff from stack, and finally whether you'll delete
any variables to free enough memory, during which confusion
you might have to purge something that was permanent.
What Ed is referring to as "solve.bin" is:
"Equation solver that acts like the solver on the HP18C/19B/17B"
(first tries ISOL, else falls back on numeric ROOT)
http://www.hpcalc.org/details.php?id=1623
http://www.hpcalc.org/hp48/math/misc/solve.zip
Which was copied from a newsgroup post [1998/06/07]:
Flexible Direct/Numeric SOLVE program (like HP18C/19B/17B)
http://groups.google.com/group/comp.sys.hp48/msg/1f37073d416d9d3a?dmode=source
As shown below, it needs the same three stack arguments as the ROOT command
(which finds *numeric* roots for a variable in an equation),
although you can omit a line, if you want to never supply the last argument,
which is the starting guess(es) [can be left in the stored variable instead].
By the way, this *won't* generally work in the 49G series with CAS;
it's only good for the 48S/G (let someone else explain why).
Contains comments introduced by "@" signs, and
"%%HP" header line for ascii data transfer (Kermit, not XModem)
%%HP: T(3); @ SOLVE: 'algebraic' 'name' guess(es) ==> root
\<< OVER STO @ Omit if you don't want to require guess(es)
@ Note that ISOL, ROOT, or ->NUM may fail for various reasons,
@ leaving different arguments on the stack in each case, e.g.
@ 'ABS(X)=0' 'X' ISOL ==> 'ABS(X)=0' 'X' [Unable to Isolate]
@ 'EXP(X)=0' 'X' ISOL ==> 'X' 0 [LN Error: Infinite Result]
@ This is why we "mark" the stack, and then drop error args.
RCLF ROT ROT -55 CF @ "Mark" the stack position
IFERR DUP2 ISOL @ First try a "direct" solution
THEN @ Use numeric solver only if this fails
WHILE 3 PICK TYPE 5 \=/ REPEAT DROP END @ Drop error args
IFERR DUP RCL @ Use existing value, if any, as guess
THEN DROP 0 @ Else use zero and one as default guesses
END ROOT @ Root is both left on stack and stored
ELSE ROT ROT DROP2 @ Drop saved args
EQ\-> \->NUM DUP ROT STO @ "Direct" solution (after ISOL)
END SWAP STOF
\>> 'SOLVE' STO @ use only on 48S/G [no CAS calcs]
@ [r->] [OFF]
.
- References:
- solve.bin update
- From: Ed
- solve.bin update
- Prev by Date: Re: Public apology (was Re: On TI-89 titanium users out there)
- Next by Date: Re: Public apology (was Re: On TI-89 titanium users out there)
- Previous by thread: solve.bin update
- Next by thread: HP 35S - Where's the 'alpha' key?
- Index(es):