Try e.g.: 3.0 4.0 5.0 50.0 200.0 HOP
Well, I guess I use 48 for numeric/graphic/scientific,
and 49 for CAS,MK,... etc.
Source Code Listing (you can copy it and send to your 48/49):
%%HP: T(3)A(R)F(.);
@ HOP ( a b c s n -> ) for 48/49; plots HOP iteration pattern for
@ real parameters a, b, c & scale factor s & no. ierations n
\<<
RAD
\-> A B C S N
\<<
# 262d # 128d PDIM
S 2. * S R\->C DUP NEG PMIN PMAX
S NEG S 2. / R\->C PVIEW
.1 .2
\-> X Y
\<< 1. N
START
X Y R\->C PIXON
'Y-SIN(X)*\v/ABS(B*X-C)' EVAL 'A-X' EVAL 'Y' STO 'X' STO
NEXT
\>>
\>>
\>>
Sent via Deja.com http://www.deja.com/
Before you buy.
Inside your code you're evaluating expression using the EVAL command.
EVAL performs a much more complex work than what it did on the HP48
(simplification, expanding etc...)
Either use ->NUM that should be slightly faster, or perform the calculation
in RPN directly so the CAS is not involved:
'Y-SIN(X)*\v/ABS(B*X-C)' EVAL
Becomes:
Y X SIN B X * C - ABS SQRT * -
And 'A-X' EVAL
becomes A X -
The speed will not change much on the HP48 (still compatible) but it will
make a significant speed difference on the HP49.
Be also sure to set APPROX mode.
As an example:
In exact mode:
Applying ABS on 'B*X-C' will take 1.14s
In approx mode it will take .05s
It will impact on the SQRT as well and many math functions..
Hope this help
Cheers
Jean-Yves
"e_tom" <e_...@my-deja.com> wrote in message
news:8475th$mi0$1...@nnrp1.deja.com...
In article <38687...@isoit370.bbn.hp.com>,
> EVAL performs a much more complex work [for algebraic expressions]
> than what it did on the HP48 (simplification, expanding etc...)
> Either use ->NUM that should be slightly faster, or
> perform the calculation in RPN directly so the CAS is not involved:
> 'Y-SIN(X)*\v/ABS(B*X-C)' EVAL
> Becomes:
> Y X SIN B X * C - ABS SQRT * -
Can we do this directly (without re-writing) via:
'expression' COMP-> ->PRG EVAL ( or COMP-> ->LIST EVAL ) ?
[using library 256]
Or perhaps using COMPEVAL (via SYSEVAL) ?
(or does that still invoke the CAS?)
> The speed will not change much on the HP48 (still compatible)
> but it will make a significant speed difference on the HP49.
> Be also sure to set APPROX mode.
> As an example:
> In exact mode:
> Applying ABS on 'B*X-C' will take 1.14s
> In approx mode it will take .05s
> It will impact on the SQRT as well and many math functions..
-----------------------------------------------------------
With best wishes from: John H Meyers <jhme...@mum.edu
JHM:
> Can we do this directly (without re-writing) via:
> 'expression' COMP-> ->PRG EVAL ( or COMP-> ->LIST EVAL ) ?
> [using library 256]
Gee, ->LST or ->PRG can be used all by themselves,
so 'expression' ->PRG EVAL seems satisfactory
(I still do not know about COMPEVAL)
But ->NUM is easier :)
So there's a 0.0120_s penalty for using algebraic notation if you put
->LST before your EVAL.
BTW, why does ->LST say XLIB 274 817 in the error message when you
give it a single number on the stack as an argument?
Pete M. Wilson
Gamewood Data Systems Internet Service
wils...@gamewood.net