Post Reply 
Plus42 Equations, Preview Release
11-26-2021, 12:07 AM
Post: #30
RE: Plus42 Equations, Preview Release
New update:

1. Added EVALN function, which evaluates an equation object specified by name. The old EVAL function is still available, but its semantics have changed so that it is basically equivalent to EVALN ST X. This means that instead of replacing the contents of the X register (that is, the equation object) with the result of the evaluation, and saving X to LASTx, it pushes the result of the evaluation onto the stack. That is, it behaves like a recall operation now, not like a unary operator.
With EVALN, equations using REGX/REGY/REGZ/REGT should be able to perform the same kind of magic as on the HP-35s.
2. Added REAL?, CPX?, MAT?, LIST?, Σ, and ∫ to the PGM.FCN menu, and moved CDATE and CTIME there from the CONVERT menu; added RCOMPLX, PCOMPLX, and INT to the CONVERT menu; added ∫ and SEQ to the TOP.FCN menu (as Shift-Σ+ and Shift-XEQ, respectively), and also added the hyperbolic functions, LNP1, and EXPM1 in additional rows in the TOP.FCN menu.
3. ANGLE, RADIUS, XCOORD, and YCOORD can now be called with a single parameter, which will be interpreted as a complex number. That makes them inverses of PCOMPLX and RCOMPLX. (They can also still be used with two arguments, as before, of course.)

I also added some code to help me troubleshoot the equation object leak, and to prevent leaked equations from accumulating in the state file until I fix the underlying bug.

Because of EVALN, the generated code no longer starts with FUNC 11, but with FUNC 01, since it no longer needs to consume the contents of the X register. This shouldn't really affect anything, but you may want to UNPARSE and then re-PARSE your equations to make sure the generated code follows the new calling convention.

(Automatically recompiling in this kind of scenario is problematic because the application may be suspended in the middle of stepping through generated code. It shouldn't be a big issue because the format for generated code should settle down to its final form pretty soon.)

Happy Thanksgiving everyone!
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Plus42 Equations, Preview Release - Thomas Okken - 11-26-2021 12:07 AM



User(s) browsing this thread: 3 Guest(s)