zathras / jrpn

JRPN - A Calculator Simulator Inspired by the HP-16C "Computer Scientist" Calculator and the HP-15C Scientific Calculator
https://jrpn.jovial.com/
Other
65 stars 7 forks source link

15c: Can't use Re<-->Im to enter complex numbers #62

Closed billf-pshs closed 9 months ago

billf-pshs commented 11 months ago

The preferred way to enter complex numbers on a 15C is to use the I key, but it may also be valid to use Re<-->Im. For example: 2 RE<-->IM 3 could reasonably result in the number 3+2i.

Before implementing this, I'd really want confirmation that this actually works on the real calculator. My 15C is currently in storage on another continent, so it might have to wait a couple of months :-)

I did try a couple of the other 15C emulators, and neither of them resulted in 3+2i for the above keystrokes, so I'm genuinely not sure what the real calculator does. I checked my code, and it's not as simple as changing the StackLift for the key; some kind of special case for data entry is probably needed.

billf-pshs commented 10 months ago

Thinking about this some more, Consider this key sequence:

g-CLX
1
Re<-->Im
2
Re<-->Im
3

If Re<-->Im could be used to enter complex numbers, what would this sequence result in? 13+2i, maybe? Or would the second Re<-->Im finish number entry? Either one would be weird. This makes me suspect that the real 15C doesn't allow Re<-->Im to be used in the suggested way.

I'll have access to my physical calculator within a couple of months anyway; I won't worry about this until then.

zathras commented 9 months ago

OK, this key sequence:

1
Re<-->Im
2
Re<-->Im
3
Re<-->Im

results in: X: 0+3i Y: 0+2i Z: 0+1i on both my physical HP15C and on JRPN. Closing issue.