Plus42 Equations, Preview Release
|
05-08-2022, 12:57 PM
Post: #621
|
|||
|
|||
RE: Plus42 Equations, Preview Release
Loving Plus42!
Two units questions: - can we get a milligram unit in the mass section? I know I can custom define, but mg would be nice built in… - when I use ASSIGN, there is a submenu for UNIT. However there is nothing in it. My custom defined units are in OTHER. What goes in the UNIT submen? |
|||
05-08-2022, 02:37 PM
Post: #622
|
|||
|
|||
RE: Plus42 Equations, Preview Release
Actually, what happens is that in ASSIGN, the PGM, REAL, CPX, MAT, LIST, EQN, and OTHER sections will show the variables belonging to those categories. Specifically: PGM shows global labels, REAL shows real variables and strings, MAT shows real and complex matrices, LIST shows lists, EQN shows equation variables (and the black-on-white EQN, which is the list of named equation in EQN mode, is blocked), and OTHER shows all variables not belonging to the aforementioned categories, meaning, numbers with attached units, and all three types of references.
MEM shows available memory and can't be assigned; FCN contains HP-42S functions; and TIME, XFCN, BASE, PRGM, STR, STK, EQNS, UNIT, STAT, DIR, DISP, and MISC contain Free42/Plus42 built-in functions. Which leaves DIRS and UNITS. DIRS really should be blocked, since assigning a directory name to the CUSTOM menu doesn't actually work. UNITS is blocked because assigning built-in units to CUSTOM doesn't actually work, either. Assigning units is a special case of assigning variables. When a CUSTOM menu key is pressed, and the assignment does not match a LBL, it is next matched against variables. If a matching variable exists and is not a number with a unit, RCL is performed; if a matching variable exists and *is* a number with a unit, the assignment is considered to be a user-defined unit, and is applied to the number in X. There is no mechanism for assigning built-in units to CUSTOM, so you'd have to create a user-defined unit matching a built-in unit, e.g. 1_m STO "m" so you could then use ASSIGN "m" TO 01. Of course this is not ideal. I'm not sure how to improve this yet. The standard HP-42S CUSTOM behavior is: look for a LBL and perform XEQ; if not found, look for a variable and perform RCL; if also not found, look for a built-in function and execute it. This could be extended to also search for units and directories, but maybe it would be better to add the type of item being assigned to the menu key. |
|||
05-08-2022, 09:58 PM
Post: #623
|
|||
|
|||
RE: Plus42 Equations, Preview Release
So I think I have all the details of my theme worked out (an updated version of GDW for Plus42) except for one issue. The alternate keys for equation mode. They work fine on macOS, but in my iPhone, all four keys have a doubled appearance. Any thoughts would be appreciated.
Theme and a screenshot of the issue are here: link to theme |
|||
05-08-2022, 10:50 PM
Post: #624
|
|||
|
|||
RE: Plus42 Equations, Preview Release
You've defined the alternate backgrounds in the part of the skin that is getting duplicated when the display area is stretched. When creating a skin that allows display stretching, you should make sure that the entire horizontal strip between y coordinates "display top" and "display bottom" can be safely replicated, or else find a sub-strip than can be, and declare its top and bottom y coordinates using a DisplayExpansionZone: line. Take a look at the PortraitShort skin to see how this is used (gif, layout).
|
|||
05-09-2022, 12:53 AM
Post: #625
|
|||
|
|||
RE: Plus42 Equations, Preview Release
(05-08-2022 10:50 PM)Thomas Okken Wrote: You've defined the alternate backgrounds in the part of the skin that is getting duplicated when the display area is stretched. When creating a skin that allows display stretching, you should make sure that the entire horizontal strip between y coordinates "display top" and "display bottom" can be safely replicated, or else find a sub-strip than can be, and declare its top and bottom y coordinates using a DisplayExpansionZone: line. Take a look at the PortraitShort skin to see how this is used (gif, layout). Ahhhh that makes sense. I will try to fix this. |
|||
05-09-2022, 02:39 AM
Post: #626
|
|||
|
|||
RE: Plus42 Equations, Preview Release | |||
05-09-2022, 07:37 AM
(This post was last modified: 05-09-2022 07:41 AM by level7.)
Post: #627
|
|||
|
|||
RE: Plus42 Equations, Preview Release
(05-08-2022 08:00 AM)level7 Wrote: Hi Thomas, first of all congratulations on your achievement and very happy to purchase Plus42 to support your efforts on this and Free42. Hope it's ok to bump my own post here as it fell behind as it was going through new member moderation. Some more irregularities with the integration: Code:
|
|||
05-09-2022, 08:40 AM
Post: #628
|
|||
|
|||
RE: Plus42 Equations, Preview Release
The integrator doesn't solve the equation, it just evaluates it, and evaluating an equation with a top-level = sign means evaluating its left- and right-hand sides and subtracting the latter from the former. So if you're integrating Y=X^2 with integration variable Y, you're integrating Y-X^2, where X will be whatever value it happens to be when you start the integration.
|
|||
05-09-2022, 08:42 AM
Post: #629
|
|||
|
|||
RE: Plus42 Equations, Preview Release
As far as crashes are concerned, of course it's hard to deal with those if they can't be reproduced. However, I'm keeping my eye on the Android and iOS developer consoles, and once I start seeing crash logs there, I should be able to make progress on those issues.
|
|||
05-09-2022, 09:49 AM
Post: #630
|
|||
|
|||
RE: Plus42 Equations, Preview Release
No crash logs for Android so far, but 7 for iOS, 5 of which are in the code that draws the axis tick marks for PLOT, and the other two appear to be app initialization failures. I'll focus on the PLOT thing first, it's probably a failure to detect invalid plot boundaries...
|
|||
05-09-2022, 11:58 AM
Post: #631
|
|||
|
|||
RE: Plus42 Equations, Preview Release
It does look like invalid plot boundaries, but I don't see how they could get into that state, since there are checks for that when setting XMIN etc.
I'll add some code to the next release to at least make sure it doesn't get stuck in an infinite loop in axis_ticks(), and instead simply skips plotting the axes when it gets into that state. |
|||
05-09-2022, 01:57 PM
Post: #632
|
|||
|
|||
RE: Plus42 Equations, Preview Release
(05-08-2022 08:06 AM)Thomas Okken Wrote:(05-07-2022 10:40 PM)TeamTricky Wrote: I have a question regarding TVM. Perhaps I am simply using this incorrectly. Please try this: Thank you for that explanation. I was (incorrectly) equating FV with BAL. When I check FV after 9 payments, it is 1000, which is the opposite of BAL. And after 12 payments, FV is -2000, again, the opposite of BAL. |
|||
05-10-2022, 06:25 AM
(This post was last modified: 05-10-2022 06:25 AM by n3mmr.)
Post: #633
|
|||
|
|||
RE: Plus42 Equations, Preview Release
In the plus42 history you say you added the TYPE? and UNIT? functions (in 1.0.1).
I can find the UNIT? function, but TYPE? is nowhere to be found, it seems? Where is it, and what does it do? |
|||
05-10-2022, 06:35 AM
Post: #634
|
|||
|
|||
RE: Plus42 Equations, Preview Release
(05-08-2022 09:58 PM)tgray Wrote: So I think I have all the details of my theme worked out (an updated version of GDW for Plus42) except for one issue. The alternate keys for equation mode. They work fine on macOS, but in my iPhone, all four keys have a doubled appearance. Any thoughts would be appreciated. Very nice work. Avoiding skeuomorphism whilst retaining a distinct personality isn't the easiest of tasks; but you've nailed it. |
|||
05-10-2022, 08:42 AM
Post: #635
|
|||
|
|||
RE: Plus42 Equations, Preview Release
(05-10-2022 06:25 AM)n3mmr Wrote: In the plus42 history you say you added the TYPE? and UNIT? functions (in 1.0.1). It's in CATALOG→PRGM (note: not PGM). In the equation editor, the type check functions are grouped together in PGM.FCN, although CPXMAT? and EQN? are missing. TYPE? returns an integer identifying the type of the object in X. This is partly documented in the Free42 page under Programming Utilities: Quote:TYPE? Returns an integer, representing the type of the object in the X register. The numbers correspond to object types as follows: Plus42 adds more types: 7: Equation 8: Unit 9: Directory Reference 10: Program Reference 11: Variable Reference |
|||
05-10-2022, 08:53 AM
Post: #636
|
|||
|
|||
RE: Plus42 Equations, Preview Release
(05-08-2022 09:58 PM)tgray Wrote: So I think I have all the details of my theme worked out (an updated version of GDW for Plus42) except for one issue. The alternate keys for equation mode. They work fine on macOS, but in my iPhone, all four keys have a doubled appearance. Any thoughts would be appreciated. If you like, I'll be happy to put it in the Plus42 skins collection on my web site once it's finished. The more choices, the better! |
|||
05-10-2022, 10:06 AM
Post: #637
|
|||
|
|||
RE: Plus42 Equations, Preview Release
(05-10-2022 08:42 AM)Thomas Okken Wrote:(05-10-2022 06:25 AM)n3mmr Wrote: In the plus42 history you say you added the TYPE? and UNIT? functions (in 1.0.1). Thank you! |
|||
05-10-2022, 01:49 PM
Post: #638
|
|||
|
|||
RE: Plus42 Equations, Preview Release
(05-09-2022 08:40 AM)Thomas Okken Wrote: The integrator doesn't solve the equation, it just evaluates it, and evaluating an equation with a top-level = sign means evaluating its left- and right-hand sides and subtracting the latter from the former. So if you're integrating Y=X^2 with integration variable Y, you're integrating Y-X^2, where X will be whatever value it happens to be when you start the integration.Thanks for the explanation - sorry if this was something that I should have known! I still think I was having some crashes with integration earlier, but it may also be me fat fingering the shift and off bottom. (05-09-2022 09:49 AM)Thomas Okken Wrote: No crash logs for Android so far, but 7 for iOS, 5 of which are in the code that draws the axis tick marks for PLOT, and the other two appear to be app initialization failures. I'll focus on the PLOT thing first, it's probably a failure to detect invalid plot boundaries...I was having issues with graphs not rendering or crashing, appreciate the quick fix! |
|||
05-10-2022, 02:18 PM
Post: #639
|
|||
|
|||
RE: Plus42 Equations, Preview Release
(05-10-2022 01:49 PM)level7 Wrote: I was having issues with graphs not rendering or crashing, appreciate the quick fix! No problem! Note that the fix will only prevent PLOT from getting stuck in an infinite loop when the plot limits are out of whack; it doesn't do anything to prevent those limits from getting out of whack in the first place. So you may still end up getting screwy plots, i.e. axes missing or nothing getting drawn at all. If you could send me your state file when that happens, it may help me find the root cause of the issue. |
|||
05-11-2022, 05:22 PM
Post: #640
|
|||
|
|||
RE: Plus42 Equations, Preview Release
I can make PLOT to go into an infinite loop if I create an equation like:
Y=X^2+5*X+6 and set the XAXIS to Y and the YAXIS to X. It seems like PLOT doesn't handle multiple solutions well. Perhaps if there are multiple solutions in one orientation, it should flip the axes and try solving again. If it works, then rotate the results to get the desired plot. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)