HP50 - Function
|
10-11-2020, 12:24 AM
(This post was last modified: 10-11-2020 01:03 AM by CMarangon.)
Post: #1
|
|||
|
|||
HP50 - Function
Hello!
In HP 50 how can I Plot a function like the one shown in the picture below? Carlos - Brazil Time Zone: GMT -3 http://area48.com |
|||
10-11-2020, 11:26 AM
Post: #2
|
|||
|
|||
RE: HP50 - Function
I thought this was going to be easy: the function IFTE(test, exp1, exp2) returns exp1 if test is true, else it returns exp2. So, plotting the function IFTE(X>0,SIN(X),1) would solve your problem.
But this doesn't work, due to a bug in the v2.15 calculator ROM (the latest version, sadly). The issue is addressed and a solution suggested here. I hope this helps. Nigel (UK) |
|||
10-11-2020, 12:24 PM
(This post was last modified: 10-11-2020 12:24 PM by Albert Chan.)
Post: #3
|
|||
|
|||
RE: HP50 - Function
I had the same problem in XCas, failed plotting invPsi(x), which uses IFTE to branch to correct guess.
I had to resort to branchless version. It seems plot is trying hard to compile the function, to speed up plotting. (it expected to call the function hundreds of time, so simplify the function is reasonable) When it hit IFTE(condition, x, y), condition part is symbolic, thus unable to simplify further. It would be nice if plot gives up compiling (if getting stuck), and continued on ... My guess is the same thing is happening to HP-50g plot. |
|||
10-11-2020, 12:34 PM
Post: #4
|
|||
|
|||
RE: HP50 - Function
(10-11-2020 12:24 PM)Albert Chan Wrote: When it hit IFTE(condition, x, y), condition part is symbolic, thus unable to simplify further. The interesting thing is, it plots the function fine until the condition becomes false, so it looks like it isn't choking on the IFTE itself but on the \(sin(x)\) in the 'false' clause if you write it as IFTE(X≤0,1.,SIN(X)). There are only 10 types of people in this world. Those who understand binary and those who don't. |
|||
10-11-2020, 04:54 PM
(This post was last modified: 09-02-2024 12:06 AM by DavidM.)
Post: #5
|
|||
|
|||
RE: HP50 - Function
(10-11-2020 11:26 AM)Nigel (UK) Wrote: The issue is addressed and a solution suggested here. The accepted solution for that thread was focused on a very specific situation, namely that of using the 50G in algebraic mode (as opposed to RPN). If using RPN (which most people should ), that solution doesn't apply. In RPN mode, entering an algebraic containing IFTE from the command line still won't work for plotting. I believe the best way to approach this if using the 50G in RPN mode would be to create a program (I'll call it 'F1') that simply has the following in it: Code: « Save that as 'F1', then go into the plotting environment and enter 'F1' as the equation to plot. ERASE, then DRAW. Function plotted! |
|||
10-12-2020, 12:30 AM
Post: #6
|
|||
|
|||
RE: HP50 - Function
Hello!
This little program ≪ IF x≤0 THEN '1' ELSE 'SIN(x)' ≫ works fine in HP48, however in HP50 I will test it now. (10-11-2020 04:54 PM)DavidM Wrote:(10-11-2020 11:26 AM)Nigel (UK) Wrote: The issue is addressed and a solution suggested here. Carlos - Brazil Time Zone: GMT -3 http://area48.com |
|||
10-12-2020, 12:42 AM
Post: #7
|
|||
|
|||
RE: HP50 - Function
Hello!
IFTE works fine! Thank you! Carlos (BR) (10-11-2020 04:54 PM)DavidM Wrote:(10-11-2020 11:26 AM)Nigel (UK) Wrote: The issue is addressed and a solution suggested here. Carlos - Brazil Time Zone: GMT -3 http://area48.com |
|||
10-23-2020, 10:48 PM
(This post was last modified: 10-24-2020 08:00 AM by David22.)
Post: #8
|
|||
|
|||
RE: HP50 - Function
(10-12-2020 12:42 AM)CMarangon Wrote: Hello! In your screen capture we can see an error: You typed IFTE(X≤1,X,SIN(X)) insetad of IFTE(X≤0,X,SIN(X)) So you graphed f(x)=X in [0,1] interval instead of f(x)=SIN(X) as you wanted to do. Graphs are so similar on that interval at that resolution that possibly you didn't notice it. |
|||
10-24-2020, 03:44 AM
Post: #9
|
|||
|
|||
RE: HP50 - Function
(10-12-2020 12:42 AM)CMarangon Wrote: IFTE works fine! What firmware version is your 50g? IFTE does not work in that context on my v2.15 50g, but I seem to recall that it does work on a v2.09 50g. I believe this became an issue somewhere between those releases. To determine the ROM version, execute the VERSION command. Thanks! |
|||
10-24-2020, 03:57 PM
(This post was last modified: 10-24-2020 03:59 PM by SammysHP.)
Post: #10
|
|||
|
|||
RE: HP50 - Function
This seems easy to fix. I wonder why there was no bugfix release. I mean even now someone must have the source and the toolchain and permission to distribute it.
|
|||
10-24-2020, 05:13 PM
Post: #11
|
|||
|
|||
RE: HP50 - Function
(10-24-2020 03:57 PM)SammysHP Wrote: This seems easy to fix. I wonder why there was no bugfix release. I mean even now someone must have the source and the toolchain and permission to distribute it. The tools are available but the source is not. Moreover, after the last update to the 50g, the HP engineers reported that there is not 1 single byte free left to patch anything, so any fix would require significant refactoring of existing systems to try to come up with some extra space, and more than 1 attempt at doing that (by HP) was not successful. So, 2.15 (or 2.16, the equivalent for emulators) is the last there will ever be I'm afraid. --Bob Prosperi |
|||
10-24-2020, 06:18 PM
Post: #12
|
|||
|
|||
RE: HP50 - Function
Your best bet and hope is newRPL.
Greetings, Massimo -+×÷ ↔ left is right and right is wrong |
|||
10-24-2020, 07:46 PM
Post: #13
|
|||
|
|||
RE: HP50 - Function
(10-24-2020 05:13 PM)rprosperi Wrote:(10-24-2020 03:57 PM)SammysHP Wrote: This seems easy to fix. I wonder why there was no bugfix release. I mean even now someone must have the source and the toolchain and permission to distribute it. it would be enough to remove everything that is "ALG" in the 50g... Hardware: Hp48S - Hp50g (5x black + 1 blue) - HP39gII - Hp27s - Casio fx-CG50 |
|||
10-24-2020, 10:00 PM
(This post was last modified: 10-24-2020 10:03 PM by David22.)
Post: #14
|
|||
|
|||
RE: HP50 - Function
(10-24-2020 07:46 PM)franz.b Wrote: it would be enough to remove everything that is "ALG" in the 50g... It may be it would be better to remove all HP 50g hard and use something like NewRPL in a better pocket hard designed for RPL from start instead of Alg mode like HP 50g (for example small ENTER on botton right/etc). It would be nice to see a SwissMicros 48 with SysRPL on a LCD screen like DM42: it is a 400 × 240 pixels ACTIVE MATRIX MemoryLCD from Sharp, the best monocrhome LCD displays I have seen. LCD displays on HP 50g is much worse: not only lower res but much lower contrast and passive matrix (display is not so sharp and pixel control is not perfect). Obviously DM42 CPU+RAM is not adequate for a modern 48, and eve keyboard would need 1 or 2 more rows |
|||
10-24-2020, 10:13 PM
Post: #15
|
|||
|
|||
RE: HP50 - Function
(10-24-2020 07:46 PM)franz.b Wrote:(10-24-2020 05:13 PM)rprosperi Wrote: The tools are available but the source is not. Moreover, after the last update to the 50g, the HP engineers reported that there is not 1 single byte free left to patch anything, so any fix would require significant refactoring of existing systems to try to come up with some extra space, and more than 1 attempt at doing that (by HP) was not successful. Or remove the SmartStream support. Does anyone actually use that stuff? — Ian Abbott |
|||
10-24-2020, 11:04 PM
Post: #16
|
|||
|
|||
RE: HP50 - Function
(10-24-2020 10:13 PM)ijabbott Wrote:(10-24-2020 07:46 PM)franz.b Wrote: it would be enough to remove everything that is "ALG" in the 50g... The 11 people that have one may object... but it's a risk I'd take... --Bob Prosperi |
|||
10-25-2020, 12:06 AM
Post: #17
|
|||
|
|||
RE: HP50 - Function
(10-24-2020 11:04 PM)rprosperi Wrote:(10-24-2020 10:13 PM)ijabbott Wrote: Or remove the SmartStream support. Does anyone actually use that stuff? I don’t know about the other 10, but I’d surely do – even though I don’t have any probe for it... |
|||
10-25-2020, 02:15 AM
Post: #18
|
|||
|
|||
RE: HP50 - Function
(10-25-2020 12:06 AM)Gerson W. Barbosa Wrote:(10-24-2020 11:04 PM)rprosperi Wrote: The 11 people that have one may object... but it's a risk I'd take... Excellent Gerson. If I could ever get my hands on one, I would too, but alas, though I searched high and low, could never find one.... --Bob Prosperi |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 4 Guest(s)