Post Reply 
newRPL: [UPDATED April 27-2017] Firmware for testing available for download
04-17-2016, 07:59 PM
Post: #261
RE: newRPL: [UPDATED Apr-17-16] Firmware for testing available for download
New version of the firmware with the following additions:

* Angles! This is a new feature ready to be tested.
* Polar complex numbers: quite rough in some edges, but implemented except a few places.
* Polar vectors: you can create them, but they are not ready to be operated upon.


Mostly the idea is to test all corner cases of angles and their associated commands, as well as complex vectors (don't forget to enable complex mode with -103 SF in order to get complex results from real operations).

Happy bug hunt.
Find all posts by this user
Quote this message in a reply
04-18-2016, 10:36 AM (This post was last modified: 04-18-2016 10:52 AM by Helix.)
Post: #262
RE: newRPL: [UPDATED Apr-17-16] Firmware for testing available for download
Perhaps there is a setting that I don't know, but the auto-power off is activated after only 30 seconds.

Another remark: when I enter 0, the autocomplete feature shows π0.

Jean-Charles
Find all posts by this user
Quote this message in a reply
04-18-2016, 12:34 PM
Post: #263
RE: newRPL: [UPDATED Apr-17-16] Firmware for testing available for download
(04-17-2016 07:59 PM)Claudio L. Wrote:  New version of the firmware with the following additions:

* Angles! This is a new feature ready to be tested.
* Polar complex numbers: quite rough in some edges, but implemented except a few places.
* Polar vectors: you can create them, but they are not ready to be operated upon.


Mostly the idea is to test all corner cases of angles and their associated commands, as well as complex vectors (don't forget to enable complex mode with -103 SF in order to get complex results from real operations).

Happy bug hunt.

One curious feature about power consumption: with the calculator off and drawing 4 mA, holding down left-shift, right-shift, or alpha decreases current to about one-tenth of this value! Pressing other buttons has no effect; current returns to 4mA when the button is released.

Although I've measured this with the latest firmware, it may have happened with the previous firmware too; I didn't test for it.

Nigel (UK)
Find all posts by this user
Quote this message in a reply
04-18-2016, 12:35 PM
Post: #264
RE: newRPL: [UPDATED Apr-17-16] Firmware for testing available for download
(04-18-2016 10:36 AM)Helix Wrote:  Perhaps there is a setting that I don't know, but the auto-power off is activated after only 30 seconds.

It can be configured, of course, but there's no user-facing application to do that yet. It goes in powers of 2 from 30 seconds, so it can be 30 sec, 1 minute, 2 min, 4 min,etc. What's a reasonable default? I use 30 seconds, most of the time is OK but sometimes it can be annoying.

(04-18-2016 10:36 AM)Helix Wrote:  Another remark: when I enter 0, the autocomplete feature shows π0.

Yes, autocomplete will suggest commands where the first character is non-ASCII based on the second character. This is so you can type LIS and the suggestion will include also ->LIST for example. There's no harm in suggesting pi I think.
Find all posts by this user
Quote this message in a reply
04-18-2016, 02:13 PM
Post: #265
RE: newRPL: [UPDATED Apr-17-16] Firmware for testing available for download
(04-18-2016 12:35 PM)Claudio L. Wrote:  It can be configured, of course, but there's no user-facing application to do that yet. It goes in powers of 2 from 30 seconds, so it can be 30 sec, 1 minute, 2 min, 4 min,etc. What's a reasonable default? I use 30 seconds, most of the time is OK but sometimes it can be annoying.

I'd vote for 4 min.


(04-18-2016 12:35 PM)Claudio L. Wrote:  Yes, autocomplete will suggest commands where the first character is non-ASCII based on the second character. This is so you can type LIS and the suggestion will include also ->LIST for example. There's no harm in suggesting pi I think.

Now I understand. There is no harm indeed.

Jean-Charles
Find all posts by this user
Quote this message in a reply
04-18-2016, 02:17 PM
Post: #266
RE: newRPL: [UPDATED Apr-17-16] Firmware for testing available for download
Claudio, just a question:

are you still working on the PC-emulation of your newRPL, or is this project dead? Wink

Franz
Visit this user's website Find all posts by this user
Quote this message in a reply
04-19-2016, 05:14 PM
Post: #267
RE: newRPL: [UPDATED Apr-17-16] Firmware for testing available for download
(04-18-2016 02:17 PM)fhub Wrote:  Claudio, just a question:

are you still working on the PC-emulation of your newRPL, or is this project dead? Wink

Franz

Not dead! Actually, newRPL is developed and tested on that same PC emulator. But compiling and putting together an installer takes a lot of work, versus just compiling a firmware. The PC binaries are updated every 6 months or so, while the calculator ROM is updated roughly monthly.
I did prepare a template of a skinnable version, it compiles and allows you to change the scale of the emulated screen and keyboard. Looks good, but that's all it does for now, until the "guts" of newRPL are ported to it. My time became even more limited in the last couple of months so it's sitting there until I have some larger chunk of time to work on it. It takes some substantial work to get it done, while working on new commands or features of newRPL is easier to subdivide into smaller tasks, and that fits better my current schedule, that's all. But it's nor dead not forgotten.
Find all posts by this user
Quote this message in a reply
05-06-2016, 05:41 PM
Post: #268
RE: newRPL: [UPDATED Apr-17-16] Firmware for testing available for download
May update!

This new version adds:

* Additional support for complex numbers in many commands (not all, so complex mode is still not going to be advertised as implemented).
* Some indicators in the status area.
* 8-level UNDO/REDO for the stack.

The last item is probably the coolest addition to newRPL.

While looking at the stack, the left cursor became UNDO. Right shift and the left cursor is REDO.
There's 8 levels (will be configurable when the GUI for settings is created).

The only drawback is that it eats some memory in two ways:
a) 4-bytes per each object in the stack.
b) It locks in memory some objects that would otherwise be removed by a garbage collection, because they are in past stacks.

But the benefits outweigh the cost, so there it is.
Find all posts by this user
Quote this message in a reply
05-24-2016, 02:11 PM
Post: #269
RE: newRPL: [UPDATED May-06-16] Firmware for testing available for download
I bought another 50g to try newRPL, and ... it arrived yesterday. All went nice! running newrpl now Big Grin

My website: ried.cl
Visit this user's website Find all posts by this user
Quote this message in a reply
05-24-2016, 06:54 PM
Post: #270
RE: newRPL: [UPDATED May-06-16] Firmware for testing available for download
(05-24-2016 02:11 PM)eried Wrote:  I bought another 50g to try newRPL, and ... it arrived yesterday. All went nice! running newrpl now Big Grin

Excellent! Test (play with) everything and report back (and often) with any opinions/ideas/bugs, etc.
I'll take the opportunity to re-post the link to an incipient attempt to document newRPL:

http://hpgcc3.org/projects/newrpl/newrpl-doc

It's way outdated and very primitive, but will give you a good idea where to start looking for differences and similarities to what we now call "classic" RPL.
The rest of the information is scattered in posts in this forum, but I was careful to start the subject with "newRPL:" on every post, so it should be easy to filter.
Enjoy (I hope!).
Find all posts by this user
Quote this message in a reply
05-24-2016, 08:19 PM
Post: #271
RE: newRPL: [UPDATED May-06-16] Firmware for testing available for download
(05-24-2016 06:54 PM)Claudio L. Wrote:  
(05-24-2016 02:11 PM)eried Wrote:  I bought another 50g to try newRPL, and ... it arrived yesterday. All went nice! running newrpl now Big Grin

Excellent! Test (play with) everything and report back (and often) with any opinions/ideas/bugs, etc.
I'll take the opportunity to re-post the link to an incipient attempt to document newRPL:

http://hpgcc3.org/projects/newrpl/newrpl-doc

It's way outdated and very primitive, but will give you a good idea where to start looking for differences and similarities to what we now call "classic" RPL.
The rest of the information is scattered in posts in this forum, but I was careful to start the subject with "newRPL:" on every post, so it should be easy to filter.
Enjoy (I hope!).

Cool! I'm going to wait for some leisure time to check all these documents. I wonder if the newrpl development can be split in several 'challenges' to take some load from you; eventually. Big Grin

My website: ried.cl
Visit this user's website Find all posts by this user
Quote this message in a reply
05-26-2016, 04:47 PM (This post was last modified: 05-26-2016 06:51 PM by compsystems.)
Post: #272
RE: newRPL: [UPDATED May-06-16] Firmware for testing available for download
Hi I have managed create the same function PART (TI89, HPPRIME) for HP48/49/50 calculators, this function to extract each part of an expression, very useful to analyze the algebraic expression, It requires that obj-> function is available in NEWRPL

sOURCE cODE
Code:

« 0 0 { } -> EXPRESSION XPART NPARTS OPERATOR OBJECTS
  « EXPRESSION EVAL
    IFERR OBJ->
    THEN ->STR 'OPERATOR' STO 0 'NPARTS' STO OPERATOR 1 ->LIST 'OBJECTS' STO
    ELSE ->STR 'OPERATOR' STO 'NPARTS' STO NPARTS ->LIST 'OBJECTS' STO NPARTS OPERATOR OBJECTS 3 ->LIST DROP
      IF XPART NPARTS <= NOT
      THEN "EXPRESSION " EXPRESSION + " CONTAINS ONLY " + NPARTS + " PARTS" + KILL
      END
      IF XPART 0 ==
      THEN OPERATOR
      ELSE
        IF XPART -1 ==
        THEN NPARTS
        ELSE OBJECTS XPART GET
        END
      END
    END
  »
»
'PART' STO


Syntax:
part(Expr, Integer)

Returns the nth sub expression of an expression. If the second argument is empty (-1 for hp48/49/50), returns the number of parts.
If the second argument is ZERO, returns the operator if any, otherwise returns the same expression as string


Examples:
TI89/TIVOYAGE200PLT AND HPPRIME

part(sin(x)+cos(y)) → 2 // two parts sin(x) & cos(y)
part(sin(x)+cos(y),1) → sin(x) // first part
part(sin(x)+cos(y),2) → cos(y) // second part
part(sin(x)+cos(y),3) → "nonexistent part in the expression"
part(sin(x)+cos(y),0) → "+" // operator between parts

part( part(sin(x)+cos(y),1)) → 1 // number of parts of the first part
part( part(sin(x)+cos(y),2)) → 1 // number of parts of the second part

part( part(sin(x)+cos(y),1),1) → x // firts part of the firts part, sin(x)→ x
part( part(sin(x)+cos(y),2),1) → y // firts part of the second part, cos(y)→ y

part( part(sin(x)+cos(y),1),0) → "sin" // operator of the firts part, sin(x)→ "sin"
part( part(sin(x)+cos(y),2),0) → "cos" // operator of the second part, cos(x)→ "cos"


part(sin(x)) → 1 // one part
part(sin(x),1) → x // first part
part(sin(x),0) → "sin" // operator "sin"

part(part(exp(x)*sin(x) + cos(x),1),2) → sin(x) // second part of the first part exp(x)*sin(x) → sin(x)
part(part(exp(x)*sin(x) + cos(x),1),0) → "*" // operator of the first part exp(x)*sin(x) → "*"
part(part(exp(x)*sin(x) + cos(x),2),0) → "cos" // operator of the second part cos(x)→ "cos"
part(part(exp(x)*sin(x) + cos(x),2),1) → "x"
part(part(exp(x)*sin(x) + cos(x),1)) → 2
part(part(exp(x)*sin(x) + cos(x),1),1) → exp(x)
part(part(part(e^x*sin(x) + cos(x),1),1),1) → x
part(part(part(e^x*sin(x) + cos(x),1),1),0) → "exp"

special cases

part(-X) → 1 // one parts
part(-X,1) → 1 // firts part, X
part(-X,0) → 1 // operator "-"

part(X1) → 0 // No parts
part(X1,0) → "X1"

part(-1) → 0 // No parts
part(-X,0) → 1 // "-1"
--------------

hp48/49/50 SERIES

'sin(x)+cos(x))' -1 → 2 // 2 parts
'sin(x)+cos(x)' 0 → "+" // operator
'sin(x)+cos(x)' 1 → 'sin(x)' // part1
'sin(x)+cos(x)' 2 → 'cos(x)' // part2
'sin(x)+cos(x)' 3 → "nonexistent part in the expression"


application of the PART function

TI89 Code
Code:
difstep(f,x)
Func
  //f(x),x
  Local op
  //diff(x,x)
  If getType(f)="VAR"
    Return when(f=x,1,0,0)
  part(f,0)->op
  //diff(k,x)
  If part(f)=0
    Return 0
  //diff(­f,x)
  If op="­"
    Return ­1*difstep(part(f,1),x)
  //diff(x^n,x)
  If op="^"
    Return part(f,2)*part(f,1)^(part(f,2)-1)
  //diff(v(x),x)
  If op="sqroot"
    Return 1/(2*sqroo(part(f,1)))
  //diff(f+g,x)
  If op="+"
    Return difstep(part(f,1),x)+difstep(part(f,2),x)
  //diff(f-g,x)
  If op="-"
    Return difstep(part(f,1),x)-difstep(part(f,2),x)
  //diff(f*g,x)
  If op="*"
    Return part(f,1)*difstep(part(f,2),x)+part(f,2)*difstep(part(f,1),x)
  //diff(f/g,x)
  If op="/"
    Return (part(f,2)*difstep(part(f,1),x)-part(f,1)*difstep(part(f,2),x))/part(f,2)^2
...
  Return undef
EndFunc
Find all posts by this user
Quote this message in a reply
05-27-2016, 12:16 AM
Post: #273
RE: newRPL: [UPDATED May-06-16] Firmware for testing available for download
I've just discovered this thread, best thing I've read in a long time.

I've briefly looked at the documentation, and I am left with a few questions:

* When do you think newRPL would be stable (v1.0) and able to replace HP's firmware, is this expected sometime in 2016-2017 or later?
* Would it be opensource and/or which license would it be released under?

Thanks!
Find all posts by this user
Quote this message in a reply
05-27-2016, 02:05 AM
Post: #274
RE: newRPL: [UPDATED May-06-16] Firmware for testing available for download
(05-27-2016 12:16 AM)jibanes Wrote:  I've just discovered this thread, best thing I've read in a long time.

I've briefly looked at the documentation, and I am left with a few questions:

* When do you think newRPL would be stable (v1.0) and able to replace HP's firmware, is this expected sometime in 2016-2017 or later?
* Would it be opensource and/or which license would it be released under?

Thanks!

Glad you found the project interesting!
Ahhhh... the big question! There's no dates, no pressure. For day-to-day number crunching it's already replaced HP firmware in one of my 50g's for several months, but it's very green in some areas, so I have the second 50g with stock firmware ready for action when I need something that's not implemented. With the calculator being so inexpensive now (and discontinued), I think every 50g owner should buy a spare, and of course flash newRPL on it!
As far as stable, I can say it is quite stable, it hardly ever crashes, but occasionally you hit a wall on something that's not implemented yet and you need it for your code. The alpha status is mainly to indicate the user should lower the expectations in terms of completeness, there's less than 25% of the commands implemented but what's done was done very carefully and is quite stable.
It is open source, BSD licensed as stated in the Sourceforge project page and in the code itself.
Find all posts by this user
Quote this message in a reply
05-27-2016, 02:25 AM
Post: #275
RE: newRPL: [UPDATED May-06-16] Firmware for testing available for download
(05-27-2016 02:05 AM)Claudio L. Wrote:  
(05-27-2016 12:16 AM)jibanes Wrote:  I've just discovered this thread, best thing I've read in a long time.

I've briefly looked at the documentation, and I am left with a few questions:

* When do you think newRPL would be stable (v1.0) and able to replace HP's firmware, is this expected sometime in 2016-2017 or later?
* Would it be opensource and/or which license would it be released under?

Thanks!

Glad you found the project interesting!
Ahhhh... the big question! There's no dates, no pressure. For day-to-day number crunching it's already replaced HP firmware in one of my 50g's for several months, but it's very green in some areas, so I have the second 50g with stock firmware ready for action when I need something that's not implemented. With the calculator being so inexpensive now (and discontinued), I think every 50g owner should buy a spare, and of course flash newRPL on it!
As far as stable, I can say it is quite stable, it hardly ever crashes, but occasionally you hit a wall on something that's not implemented yet and you need it for your code. The alpha status is mainly to indicate the user should lower the expectations in terms of completeness, there's less than 25% of the commands implemented but what's done was done very carefully and is quite stable.
It is open source, BSD licensed as stated in the Sourceforge project page and in the code itself.

Sounds good, how to install?
Find all posts by this user
Quote this message in a reply
05-27-2016, 08:07 PM
Post: #276
RE: newRPL: [UPDATED May-06-16] Firmware for testing available for download
(05-27-2016 02:25 AM)jibanes Wrote:  Sounds good, how to install?

It's all in the first post of this thread.
Find all posts by this user
Quote this message in a reply
06-01-2016, 11:34 PM
Post: #277
RE: newRPL: [UPDATED May-06-16] Firmware for testing available for download
Finally I've been able to grab my old HP49G+ and now I can do some tests on the real metal!

The calc I'm testing comes from one of the first batches produced by HP and suffers from the infamous keyboard quality: a couple of keys were wiggly in their seat, and I suspect that situation will grow worse as I continue with my tests. Nevertheless, everybody else installs NewRPL on their 50G (which I own) so it just makes sense to test an older platform.

  1. Installation and usage
    Installation went as smooth as silk. The calc was never flashed before (except for official HP upgrades) and none of the problems reported by other users were experienced. The UI is snappy and pleasant to use. Rarely some keys bounce or fail to register, but I don't know if it's me being too cautious or the keyboard failing. Anyway the problem is way less frequent than with original firmware: if KEYTIME→/→KEYTIME will ever be implemented I'd like to do some tests.
  2. Bug reporting
    Is it possible to add the VERSION command reporting ROM build information (e.g. Sourceforge commit ID)? People could keep reporting bugs that have been already fixed...
  3. ATAN2 vs ARG
    These commands are perfectly equivalent (apart from the input values they require, of course) but IMHO they should behave differently in one case: when x=0 and y=0.
    It's only logical that ARG returns 0° when input is (0,0): it's conventional result and backward compatible with HP firmware. On the contrary ATAN2 is a totally new addition to the language, and doesn't have to worry breaking any compatibility. This is the reason I suggest that « 0 0 ATAN2 » should return NaN, which is coherent with many programming languages and usually expected.
  4. SIN & COS
    They should return NaN when their input is ±∞. Actually they return a bogus value.
  5. Parser
    100'X' [ENTER] returns itself on the stack instead of 100 on level 2 and 'X' on level 1.
    . [ENTER] (the dot symbol) returns itself on the stack instead of Syntax Error.
    [EEX] [ENTER] returns 1 on level 2 and E on level 1 instead of Syntax Error.
  6. Signed/unsigned infinity
    In the context of operations with real numbers, infinite results should always have sign; in the context of operations with complex numbers, infinite results should always be unsigned. In other words:

    1/0 = +∞ (now it's just )
    -1/0= -∞ (correct)
    (0,1)/0 = ∞ (now it's Division by Zero error)

    I know, it's nitpicky! Wink
  7. SIN, COS and TAN with purely imaginary arguments
    SIN(n*(0,1)) and TAN(n*(0,1)) where n is a real number should return an imaginary number. Actually they return a complex number with a tiny real part.
    Similarly COS(n*(0,1)) should return a real number whereas it returns a complex number with a tiny imaginary part.
Find all posts by this user
Quote this message in a reply
06-02-2016, 12:51 AM
Post: #278
RE: newRPL: [UPDATED May-06-16] Firmware for testing available for download
(06-01-2016 11:34 PM)JoJo1973 Wrote:  Finally I've been able to grab my old HP49G+ and now I can do some tests on the real metal!

The calc I'm testing comes from one of the first batches produced by HP and suffers from the infamous keyboard quality: a couple of keys were wiggly in their seat, and I suspect that situation will grow worse as I continue with my tests. Nevertheless, everybody else installs NewRPL on their 50G (which I own) so it just makes sense to test an older platform.

  1. Installation and usage
    Installation went as smooth as silk. The calc was never flashed before (except for official HP upgrades) and none of the problems reported by other users were experienced. The UI is snappy and pleasant to use. Rarely some keys bounce or fail to register, but I don't know if it's me being too cautious or the keyboard failing. Anyway the problem is way less frequent than with original firmware: if KEYTIME→/→KEYTIME will ever be implemented I'd like to do some tests.
  2. Bug reporting
    Is it possible to add the VERSION command reporting ROM build information (e.g. Sourceforge commit ID)? People could keep reporting bugs that have been already fixed...
  3. ATAN2 vs ARG
    These commands are perfectly equivalent (apart from the input values they require, of course) but IMHO they should behave differently in one case: when x=0 and y=0.
    It's only logical that ARG returns 0° when input is (0,0): it's conventional result and backward compatible with HP firmware. On the contrary ATAN2 is a totally new addition to the language, and doesn't have to worry breaking any compatibility. This is the reason I suggest that « 0 0 ATAN2 » should return NaN, which is coherent with many programming languages and usually expected.
  4. SIN & COS
    They should return NaN when their input is ±∞. Actually they return a bogus value.
  5. Parser
    100'X' [ENTER] returns itself on the stack instead of 100 on level 2 and 'X' on level 1.
    . [ENTER] (the dot symbol) returns itself on the stack instead of Syntax Error.
    [EEX] [ENTER] returns 1 on level 2 and E on level 1 instead of Syntax Error.
  6. Signed/unsigned infinity
    In the context of operations with real numbers, infinite results should always have sign; in the context of operations with complex numbers, infinite results should always be unsigned. In other words:

    1/0 = +∞ (now it's just )
    -1/0= -∞ (correct)
    (0,1)/0 = ∞ (now it's Division by Zero error)

    I know, it's nitpicky! Wink
  7. SIN, COS and TAN with purely imaginary arguments
    SIN(n*(0,1)) and TAN(n*(0,1)) where n is a real number should return an imaginary number. Actually they return a complex number with a tiny real part.
    Similarly COS(n*(0,1)) should return a real number whereas it returns a complex number with a tiny imaginary part.

Thanks for testing, your points are valid, not nitpicky at all. Currently there's no way to distinguish complex infinity from real infinity, I have to think how to implement something like that (infinity and NAN are now real numbers).
All other points will be taken care of, I know some functions were not tested with special numbers and infinity, so please test them all and report (also pass NaN as an argument to see what happens, in most cases they should behave properly but some may not).
Find all posts by this user
Quote this message in a reply
06-02-2016, 03:40 AM
Post: #279
RE: newRPL: [UPDATED May-06-16] Firmware for testing available for download
Found what I think is another bug:

The function DET gives an error "Invalid opcode" when used on a valid matrix

For example:

[ [4 2 7] [7 2 9] [1 4 8] ]
DET

Gives 8 on standard firmware but "Invalid opcode" in newRPL.

I know the matrix is entered correctly because newRPL will compute its inverse without reporting any error and return the correct result.

François
Find all posts by this user
Quote this message in a reply
06-02-2016, 07:58 AM
Post: #280
RE: newRPL: [UPDATED May-06-16] Firmware for testing available for download
Ok, I'll start some torture tests on built-in functions... results will surface on this thread ASAP.

If I've correctly understood the implementation in your code, infinities are just normal numbers with an INFINITY flag set. This could open interesting possibilities:

  1. ±∞ are represented just by ±1 with INFINITY flag set
  2. Complex ∞ is represented by (0,0) with real and imaginary parts having INFINITY flag set
  3. Similarly a point at infinity on the complex plane is represented as a generic complex number (normalized to unitary modulus?) with real and imaginary parts having INFINITY flag set. In this way the calc could return meaningful results to programs such as « -∞ 4 XROOT ».

    Wolfram Alpha has just taught me that this program is meaningful, and the answer is (sqrt(2)/2,sqrt(2)/2)*∞. Quite logical, if I think about it!

I see two advantages: everything seems to be already in place for implementation, and numeric type will be automatically been taken care of by the system. What do you think?

(06-02-2016 12:51 AM)Claudio L. Wrote:  Thanks for testing, your points are valid, not nitpicky at all. Currently there's no way to distinguish complex infinity from real infinity, I have to think how to implement something like that (infinity and NAN are now real numbers).
All other points will be taken care of, I know some functions were not tested with special numbers and infinity, so please test them all and report (also pass NaN as an argument to see what happens, in most cases they should behave properly but some may not).
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: