The following warnings occurred:
Warning [2] Undefined array key 20077 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $thread - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $fid - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 20077 - Line: 331 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 331 errorHandler->error_callback
/inc/plugins/threaded_mode.php 304 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $theme - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $theme - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $lang - Line: 5 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 5 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Attempt to read property "messages_in_thread" on null - Line: 5 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 5 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks





Re: Polar to Rectangular etc. on the 48 Series



#2

Press the MTH key, then the VECTR menu key, then the NXT key to get to the RECT, CYLIN, and SPHER coordinate system mode setting keys. Press NXT again to get back to the first page of the menu, where you'll find the V\-> command, which will return the components of a complex number or vector as real numbers appropriate to whichever coordinate system and angular modes are in effect. You could also use OBJ\-> to take these objects apart. On the same menu page you have the \->V2 and \->V3 commands for making vectors from real numbers. Note that RECT, CYLIN, and SPHERE are also available as commands.

MTH NXT and menu key CMPL gives you a page and a half of commands for working with complex numbers.

Play around with these commands a bit, and I think that you'll find the 48 very easy to use, even though a complex number is a different object type, not just two numbers.

SYSEVAL does have some dangers. The only argument checking that it does is to make sure that there's a user binary integer in level 1. Then it goes to whatever address you gave it and executes whatever happens to be there. If you give it the wrong address, or give it the right address but don't have whatever arguments that that routine requires on the stack, then you may very well get a warmstart or find yourself at the "Try To Recover Memory?" screen. So if you use it in a program, make sure that the program checks for any needed arguments before doing the SYSEVAL, and double check the binary integer value (including the base) before you run it.

Similar precautions apply to the LIBEVAL command, except that it will error out if the library function doesn't exist.

Make sure that you always have a recent backup.

And yes, I'm sure that there must at least be addresses for displaying complex number and vectors in the different coordinate system and angular units, and for taking complex numbers and vectors apart and putting them back together again, but why do easy things the hard way?

If you want to learn more about what "internal" routines are available, then visit www.hpcalc.org and see the wealth of information about SysRPL programming available there.

Regarding LASTX, I'm not too sure what you're asking for; do you mean that you want to put only whatever was previously on level 1 before the most recent command was executed back on the stack? The following program should restore whatever was the level 1 argument for the last command that took any arguments. Note that it doesn't restore what was on level 1 before commands that don't take any arguments, like CLEAR, DEPTH, STD, MEM, and so on. If flag -55 is set, then it errors out. If flag -55 is clear but the last argument buffer is empty, then it puts the number 0 in the last argument buffer.

\<<
DEPTH \-> d
\<< LASTARG DEPTH d -
IF
DUP
THEN
DUP2 2 + ROLLD DROPN DUP
END
DROP
\>>
\>>
Checksum: # 558Fh
Bytes: 69
Is that what you're looking for?

Regards,

James


Possibly Related Threads…
Thread Author Replies Views Last Post
  HP 35s polar/rectangular conversion CD Dodds 6 2,597 11-28-2013, 02:39 PM
Last Post: Dieter
  Rectangular to Polar, Polar to Rectangular – One more time Jeff O. 0 1,027 11-06-2013, 11:32 AM
Last Post: Jeff O.
  More programs for polar-rectangular conversion on HP Prime Michael de Estrada 4 1,936 11-04-2013, 12:43 AM
Last Post: Michael de Estrada
  OT--Hyperbolic Polar<-->Rectangular Coordinates Matt Agajanian 2 1,177 09-30-2013, 08:53 PM
Last Post: Matt Agajanian
  [WP 34s] Polar & Rectangular Number Display Jeff O. 9 2,698 01-12-2013, 05:08 AM
Last Post: fhub
  HP-48: extract coefficient of power series Thomas Klemm 3 1,499 10-21-2012, 11:42 PM
Last Post: Han
  Best Keyboard of the HP 28/48/49/50 Series Eddie W. Shore 9 3,167 07-12-2012, 07:21 AM
Last Post: Dave Britten
  Did HP or any 3rd party make a 64K card for the 48 series? mr-scorpio 2 1,084 07-22-2011, 11:50 PM
Last Post: Martin Pinckney
  Parametric and Polar functions on 50G Ben 2 1,040 03-03-2010, 02:18 PM
Last Post: John McCormick
  Why the theta choice for complex number display in polar form on the HP35s ? Mohammed Hadi 11 2,770 11-29-2009, 03:11 PM
Last Post: designnut

Forum Jump: