The following warnings occurred:
Warning [2] Undefined array key 33780 - 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 array key 33785 - 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 array key 33814 - 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 array key 33818 - 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 array key 33827 - 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 array key 33834 - 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 array key 33835 - 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 array key 33836 - 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 array key 33838 - 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 array key 33840 - 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 33840 - 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 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/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 array key 33836 - 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 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/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





HP12C Platinum with Viktor Toth's trig functions?



#11

Has anyone with access to a new Platinum and an old 12C tried to run Viktor Toth's trig function program (http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/articles.cgi?read=225) to see how the times compare? I assume Viktor did his calculations on an original HP 12C, and I'm curious how the times compare to the newer 12C's (one battery job) and the 12C Platinums.

Given the discussions about the program execution speed problems with the inate programs, I'm curious.

Thanks ahead of time.
Tony David Potter


#12

Hi;

I think the only one that (we know about) has an HP12C platinum in hands is Gene. Unless otherwise stated...

A few days ago I wrote a small routine to compute permutations and combinations without simplifying terms, just plain expression and existing fatorial. It is a single sequence, no jumps or subroutine calls, uses only stack register and, for a given pair a and b, it returns Ca,b and Pa,b in X and Y registers at once. It was witten after an inspiring e-mail from Michel Beauliou (thenks, Michel).

I loaded it in an HP38C, an HP38E and an HP34C. The winner was HP38E, second place HP38C and as third place, the HP34C. I wonder about step numbers and LBL/GTO/SBR structure and the many extra checks a resourcefull O.S. must perform that are not prformed by others with less power.

As Viktor Toth's trigs use (in a thoughtfull way) loops to compute and accumulate the terms of the series for sine, we we will probably face an expected slow-down effect. Also, it's necessary to add a '0' to each [GTO], I guess, but step numbers will be maintained if the program is still in the first steps. Have you imagined that? Original Viktor Toth's uses almost 80 steps, right? In the HP12C it's almost all program memory and "consumes" 7 (or eight) registers. In the 12C Platinum it uses about 1/5 of the available maemory and all registers remain intact, what means you can load trigs and still compute cash-flow with 20 entries...

Just my US$ 0.01.

Luiz C. Vieira - Brazil


#13

Let everyone know.


#14

(n/t)


#15

Hi all. Have run a few trig tests.

Cosine Tests
X Original 12c speed 12c Platinum speed
1.77 11 seconds 5 seconds
3.14 15 seconds 8 seconds

arc cosine test
x Original 12c speed 12c platinum speed
cos(pi/4) 37 seconds 24 seconds

(Note...the cosine of pi/4 is the input, so it should return pi/4 and does).

Bottom line: Run times are cut between 35% and 55%. Depends greatly upon loop vs. function calling. If you have a program that calls square roots, powers, logs, etc. very often, then you won't get a lot of speed benefit. For example:

Test loop takes log and power 10 times and stops:

LN
E^X
LN
E^X
LN
E^X
LN
E^X
LN
E^X
LN
E^X
LN
E^X
LN
E^X
LN
E^X
LN
E^X
Goto 00

Original 12c - 9 seconds
12c platinum - 8 seconds

Real pain with my 12c platinum since it turns OFF whenever it encounters a R/S or GTO 000 in a program. Nice feature, huh? (Surely they fixed this in the marketed version).

#16

Thanks for the interesting results, Gene.

BTW, did you also test the other 12C trigs program, as you posted you would a few days ago ? I'd like to know.

All the best.


#17

I used to have a copy, but it disappeared on the drive.

I'll be glad to test it.


#18

I don't have the original PDF document either, but fortunately this plain text version of the relevant parts
was laying around. Best.

----------------
Program listing
----------------

- SQRT is the square root function
- X<>Y is the "X exchange Y" stack operation


01 STO 5 26 * 51 STO 5 76 +
02 1 27 - 52 g SQRT 77 -
03 STO 6 28 g SQRT 53 X<>Y 78 g X=0?
04 RCL 5 29 g GTO 00 54 1 79 g GTO 82
05 RCL 5 30 ENTER 55 - 80 g LSTX
06 CHS 31 ENTER 56 g X=0? 81 g GTO 66
07 STO 5 32 * 57 g GTO 59 82 RCL 4
08 RCL 6 33 1 58 g GTO 39 83 g X<=Y?
09 2 34 + 59 g n! 84 g GTO 89
10 + 35 g SQRT 60 STO 6 85 g LSTX
11 STO 6 36 / 61 RCL 5 86 8
12 Y^X 37 STO 4 62 - 87 *
13 g LSTX 38 3 63 g SQRT 88 g GTO 00
14 g n! 39 X<>Y 64 / 89 g LST X
15 / 40 ENTER 65 STO 5 90 CHS
16 + 41 * 66 RCL 5 91 g GTO 86
17 - 42 CHS 67 CHS 92 CLX
18 g X=0? 43 1 68 STO 5 93 ENTER
19 g GTO 22 44 + 69 RCL 6 94 *
20 g LSTX 45 g SQRT 70 2 95 CHS
21 g GTO 05 46 CHS 71 + 96 1
22 g LSTX 47 1 72 STO 6 97 +
23 1 48 + 73 Y^X 98 g SQRT
24 g LSTX 49 2 74 g LSTX 99 g GTO 37
25 g LSTX 50 / 75 /


You can test that the program is loaded correctly, and its accuracy by checking
these results, shown as they are displayed in FIX 9 (f 9 in the 12C):

-------------------------------------------------------------------
x Sin(x) Cos(x) Tan(x) Time
-------------------------------------------------------------------
0.1 0.099833417 0.995004165 0.100334672 6 sec.
0.5 0.479425539 0.877582562 0.546302490 7 sec.
1 0.841470985 0.540302306 1.557407724 9 sec.
Pi/2 1.000000000 0.000000000 would div by 0 10 sec.
2 0.909297427 0.416146836 2.185039869 12 sec.
Pi -7.098535e-12 1.000000000 -7.098535e-12 19 sec.
-------------------------------------------------------------------
x ArcSin(x) ArcCos(x) ArcTan(x) Time
-------------------------------------------------------------------
0.1 0.100167425 1.470628906 0.099668661 10 sec.
0.5 0.523598775 1.047197552 0.463647607 12 sec.
1 1.570796327 0.000000000 0.785398163 15 sec.
10 - - 1.471127675 15 sec.
100 - - 1.560796637 18 sec.
1000 - - 1.569796326 18 sec.
1E10 - - 1.570796327 18 sec.
-------------------------------------------------------------------


-------------------
Usage instructions
-------------------

As the 12C doesn't have user labels, these are the entry points
to compute the functions, with the argument X assumed to be
in the display (X-register):

-----------------------------------------------------------------------
Function To compute, press: Input range
-----------------------------------------------------------------------
Sin(x) GTO 00, R/S, X<>Y -5*Pi to +5*Pi
Cos(x) GTO 00, R/S -Pi/2 to +Pi/2
Tan(x) GTO 00, R/S, / -Pi/2 to +Pi/2
ArcSin(x) GTO 37, R/S -1 to +1
ArcCos(x) GTO 93, R/S 0 to +1
ArcTan(x) GTO 30, R/S -9.99E49 to +9.99E49
the constant Pi/2 GTO 92, R/S no input required


------
Notes
------

- all angles are assumed to be in radians.

- no stack registers are preserved nor is X stored in LSTX, but R0-R3 are
available at all times to store intermediate results or constants. The
financial registers can be used as well.

- for Sin(x), Cos(x), and Tan(x) you can use f PRGM or GTO 01 instead of
GTO 00. After any function is computed, the program pointer is left again
at step 00, so you can compute a series of sines, cosines and tangents
by simply pressing R/S.

- Sin(x) and Cos(x) are computed simultaneously. Sin(x) is left in the
Y-register, and Cos(x) is left in the X-register (display), so you
can obtain Tan(x) by simply pressing the [/] (division) key. If Cos(x)
equals 0, you can't perform the division but must assume instead that
Tan(x) becomes infinite

- the input range for Sin(x) goes from -5*Pi to +5*Pi, but large values
of x (say > 2*Pi) result in reduced accuracy and increased running times,
so you'd do well restricting your arguments to the range from -2*Pi to
+2*Pi and reduce any larger ones to that range (by taking the remainder
modulus 2*Pi).


#19

Ok. Have tested these examples.

[pre]
cosine test
X 12c platinum original 12c
0.1 6 seconds 6 seconds
0.5 7 seconds 7 seconds
1 3 seconds 9 seconds (No, that's not a misprint!)
PI/2 10 seconds 10 seconds
2 12 seconds 12 seconds
PI 22 seconds 19 seconds (Not a misprint either)

Arc Sine test
0.1 7 seconds 10 seconds
0.5 9 seconds 12 seconds
1 13 seconds 15 seconds

Make of these what you will. :-)
[\pre]

#20

Typed up the following bizarre program on both the original 12c and the 12c platinum. Note: to make it easier to read, I have put numbers all on one line.

360
n
10
ENTER
12
/
i
90000
PV
PMT
CHS
SQRT
1/X
3
Y^X
3
1/x
Y^X
1/X
ENTER
X (Note: I used the newfangled X^2 function on 12c platinum)
CHS
PMT
RCL
PV
5000
-
PV
FV
GTO 00

Times: Original 12c: 7 seconds, 12c platinum: 8 seconds.

Final answer: 99,186.99719. Interestingly, both agree to the last decimal point on the answer.


Possibly Related Threads…
Thread Author Replies Views Last Post
  HP12c Present Value of $1.. Inaccurate??? Edward Dixon 12 3,533 11-12-2013, 11:32 AM
Last Post: Edward Dixon
  Trig vs hyperbolic handling differences in Prime CAS Michael de Estrada 3 1,532 11-08-2013, 06:26 PM
Last Post: Mark Hardman
  [41CL] New Extra Functions version Monte Dalrymple 0 1,082 11-08-2013, 04:32 PM
Last Post: Monte Dalrymple
  HP 12C Platinum Programming v. Gold Face Dean Lewis 10 3,295 11-03-2013, 07:30 PM
Last Post: Kimberly Thompson
  HP Prime: in need of help with defining functions Alberto Candel 14 4,184 10-27-2013, 10:48 AM
Last Post: Alberto Candel
  HP Prime spreadsheet functions SanS 0 1,875 10-04-2013, 04:23 AM
Last Post: SanS
  Stats functions on the HP34S Nicholas van Stigt 5 1,949 09-24-2013, 02:45 AM
Last Post: Nick_S
  Trig Functions Howard Owen 11 3,408 09-16-2013, 02:53 PM
Last Post: Fred Lusk
  50g piecewise functions Kurt Fankhauser 6 2,292 09-15-2013, 08:01 PM
Last Post: Kurt Fankhauser
  trig scales on the Post Versalog slide rule Al 12 3,592 09-15-2013, 06:01 AM
Last Post: John I.

Forum Jump: