The following warnings occurred:
Warning [2] Undefined array key 97316 - 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 97320 - 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 97324 - 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 97330 - 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 97340 - 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 97357 - 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 97369 - 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 97370 - 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 97396 - 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 97400 - 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 97404 - 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 97414 - 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 97435 - 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 97443 - 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 97455 - 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 97324 - 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 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 97340 - 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 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 97400 - 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 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 97443 - 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 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 97455 - 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 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 97404 - 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 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





HP-12C Platinum Trigs Program



#12

I have just posted the final version of the Trigonometric Functions Program (The 239 Steps :) for the 12C Platinum in the Articles Forum:

Fast and Accurate Trigonometric Functions on the HP-12C Platinum

Because at least 11 significant digits are always correct all through the ranges below (I haven't found less accurate results so far - perhaps I haven't searched long enough...) , the results match those displayed by the 11C and the 15C. If fact, thanks to the 12C Platinum internal precision, is seems we have now the most accurate 10C-series calculator regarding trigonometric functions (Hey, it has just passed Voidware's Trig Torture Test! Not bad: relative error 1.72x10^-5, slightly better than the HP-32SII and the HP-48G (2.26x10^-5) - This does not mean it's better than the HP-48G, although it might be better than the HP-15C: relative error 1.33x10^-3).

          Input ranges 

SIN, COS, TAN: |x| <= 1E11
ASIN, ACOS: |x| <= 1
ATAN: |x| <= 9.99999999E49

Running Times

SIN, COS: 2.4 s (|x| <= 180)
TAN: 4.7 s (|x| <= 180)
ASIN, ACOS, ATAN: 2.5 s

Feedbacks appreciated.

Best regards,

Gerson.


#13

Gerson,

Cool and thorough update. Thanks for the labor of love and the enthusiasm to share it with us. You make the HP-12CP kick "assests"

Namir


#14

Thanks Namir,

I thought of including a radians mode but I quit because this would sacrifice the speed even more. Besides, a kind of annunciator would be needed. About speed, assuming that 2 is stored in register 6, 047 might be a shortcut to sine, about only 1.6 seconds instead of the usual 2.4 or 2.5 seconds (But then g GTO 047 R/S would take more time than simply R/S :-)

Regards,

Gerson.

#15

Speaking of "torture tests", does anyone have such a test (or just a good collection of test cases) for the TVM functions?


#16

Still at voidware.com, in the 12CP page, there are some TVM-related tests, not exactly torture tests, though:

http://voidware.com/calcs/hp12cp.htm

#17

Quote:
Because at least 11 significant digits are always correct all through the ranges below....

Maybe this is a tangent I should take into a new thread, but the above comment fascinated me.

I am a rank amateur at all this, I must admit, but I am aware that many if not most of the "newer" HPs (i.e. those marketed after 1980) maintain at least 2 or 3 guard digits of internal precision--so the HP41 series and 15C compute internally to 13 digits, and the 42s to 15 digits, for example.

Gerson's comment seems to imply that the internal precision can be accessible to the RPN programmer. Round off error is the bane of my existence in my programs, so I would be keen to learn how to code in such a way so as to capitalize on the internal precision of these calculators. For example, is register arithmetic performed at full internal precision? At what stage is the full internal precision lost in intermediate calculations? What techniques, either in RPN programs or in direct key entry, can one use to minimize this rounding before it is desired in the final result?

Maybe I am asking a basic question intrinsically obvious to most, but I really have no clue, and this is something I would like to learn about.

Les


#18

Hello Les,

You're right about the gard digits on "newer" HP calculators. Thanks to them, the 10 significant figures in all my examples are correct on the HP-15C, and all 12 significant figures are correct on the HP-50G. However, on those calculators the gard digits are not normally available to the user. If you try this on the HP-15C:

3 1/x 10000 x FRAC

and you'll get

0.333333

On the other hand, on the 12C Platinum you would get

0.33333333

By what I've read, on the 48 and 49 series 15 significant digits are accessible through System-RPL.

Regards,

Gerson.


#19

I see!

On the 12Cp, the operation of moving the decimal point permits the user access to two extra SDs, whereas they are not available on the 15C, or the 41 series, or, for that matter on the 42S (where your test gives 0.33333333).

Quote:
Thanks to them, the 10 significant figures in all my examples are correct on the HP-15C....

I think you mean the 12Cp here, not the 15C? Typo?

Best,

Les


#20

Quote:
I think you mean the 12Cp here, not the 15C? Typo?

I did mean the 15C. I intended to say the 15C, despite being a 10-digit calculator, have trigonometric functions accurate to 10 places because of the extra guard digits. That would not be possible, no matter how good the algorithm was, if it performed internal calculations with only 10 digits. On the 12CP, thanks to the two hidden digits, results accurate to 10 places were possible.

Best regards,

Gerson.

#21

This is really impressive. I have been germinating an interest in polynomial and rational approximation. I recently successfully ported the Numerical Recipes rational approximation routine in section 5.13 of the book to Maple. Couldn't get the code to work in C, but the Maple version works beautifully, and if anyone here uses Maple I would love to share it. That routine, for folks who know the work, purports to be at best a "sloppy" approximation that uses an iterative weighted leastsquares approach to roughly approach a minimax fit without going thru the the Remez rigamarole. I find the approach works very well with the trigonometric functions, and if it doesn't give a true minimax fit it comes close in these cases. Indeed I was able to generate coefficients pretty close to yours for the sine fit. Your range reduction is inspired, and indeed it helps you achieve such high accuracy with a relatively small polynomial. I am also impressed with how you experimented with the coeffiecients, truncating them to strike a balance between lower memory usage and acceptable precision.

In my experimenting I came across an example that should warm the cockles of your heart. (What is a cockle anyway?)

Try your routine to compute sin(32.888 deg). The displayed answer is 0.542998588, and when you multiply by 1000 and take the fractional part you see the full twelve digit result is 0.542998588466. This is what I see on my HP48G, HP49G+, and HP42S.

In Maple, sin(32.888*Pi/180) gives, to 25 digits, .542998588465592253694888.

But on my 15C, 41CV, and 41CX, I get 0.542998589, though when multiplying thru by 10 to see the tenth digit it is indeed a 5, the effect of the 6 rounding up the 4. When it is off the display that five rounds up the 8 to 9. But the 12Cp displays what we know to be the more correct 9 digit answer, given what we know the next three digits to be. I think that is pretty impressive.

Thanks for sharing this excellent work with us.

Les


#22

Quote:
I am also impressed with how you experimented with the coeffiecients, truncating them to strike a balance between lower memory usage and acceptable precision.

I just used spreadsheets, computing sines from 1 to 90 degrees and arctangents from 0 to 0.28 in steps of 0.01, graphing the functions and comparing the differences in relation to the real functions. It was just a matter of changing the coefficients and observing the maximum error and the graphs. I thought it was important to keep the maximum positive errors close to the maximum negative errors, so that they cancelled each other in random sequence of calculations. Spreadsheets were not available to people who implemented these functions through polynomial approximations on some mid 70's calculators, which makes their work even more remarkable (please see a short comment about Elektronika C3-15 on this old thread, under Additional information: http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/forum.cgi?read=97113#97113


Quote:
an example that should warm the cockles of your heart. (What is a cockle anyway?)

-------------------------
cockle1 [kók’l] noun (plural cockled)
1. mollusc with heart-shaped shell: a small mollusc that has a rounded or heart-shaped ridged shell in two parts.
Family: Cardiidae

warm the cockles of your heart
to give you a feeling of well-being or sentimental contentment

Encarta® World English Dictionary © & (P) 1999, 2000 Microsoft Corporation. All rights reserved. Developed for
Microsoft by Bloomsbury Publishing Plc.

-------------------------

Thanks for the opportuny of learning a new word and a new idiom :-)

Quote:
But the 12Cp displays what we know to be the more correct 9 digit answer, given what we know the next three digits to be.

That's right! I had already come across a similar example when comparing the results with the 15C (a difference of one unit in the least significant digit). But then I checked the result on the 42S. Thanks for your keen remark. I forgot to mention all HP-50G results in my comparison tables are accurate to 12 digits (I checked them upon my own RPN calculator written in Delphi, which displays 15 digits, 0.542998588465592 in your example).

As I said, the results are far better than I expected. When I wrote the first version of this program I didn't have a 12C Platinum for tests (I actually used an equivalent 15C program):

http://www.geocities.com/gwbarbosa/prgms_1.html

Best regards,

Gerson.


#23

Quote:
I just used spreadsheets

May I ask which one? I ask since MS Excel is not really very robust for high precision calculation of math functions. It offers pretty mediocre performance for special functions and statistical distributions, but maybe it is a bit better for the trig functions. At any rate, I understand there are interfaces to import tables of values from trusted sources like Mathematica.

Quote:
I thought it was important to keep the maximum positive errors close to the maximum negative errors

You no doubt discovered that the absolute error of the final function reveals a magnification in error as the argument increases. I take it you got an equal ripple minimax fit of sin(sqrt(y))/sqrt(y) on the interval 0..(Pi/6)^2, then substituted y = x^2 to get sin(x)/x = a polynomial in x^2 + error. Multiplying thru by x will magnify the absolute error on the interval as x gets bigger. Fortunately, with range reduction you kept the interval of interest small enough this poses no hardship.

Quote:
I checked them upon my own RPN calculator written in Delphi

This is an off-topic diversion, but I have noticed that Delphi is surprisingly good for math programming. The extended data type seems to yield 17 digits of accuracy and up without much fuss, whereas the long double type in C is all over the place depending on the platform and compiler. Right now I am fooling around a bit with the 384 bit qfloat type under lcc-win32. Very gratifying to get 100-digit precision with so little fuss, though portability is a huge issue.

Les


#24

.

#25

Les, if you haven't already done so, you should read this:

http://docs-pdf.sun.com/800-7895/800-7895.pdf

#26

Valentin Albillo's "Tried and Tricky Trigonometrics" article in Datafile V21N1 describes a program to compute sine, cosine tangent, arc sine, arc cosine and arc tangent - to full accuracy - that fits within the 99 steps available on a standard 12C.

You can download a copy from Valentin's web pages. Alternatively the full Datafile issue is available to buy on cd-rom from Jake Schwartz.


Possibly Related Threads…
Thread Author Replies Views Last Post
  HP Prime: run a program in another program Davi Ribeiro de Oliveira 6 2,616 11-11-2013, 08:28 PM
Last Post: Davi Ribeiro de Oliveira
  HP 12C Platinum Programming v. Gold Face Dean Lewis 10 3,298 11-03-2013, 07:30 PM
Last Post: Kimberly Thompson
  HP12C Platinum PC software activation fails Russell Clinton 0 1,066 07-02-2013, 02:32 PM
Last Post: Russell Clinton
  HP 12c Platinum Emulator Activation Server Problem Danny Farley 5 1,836 04-09-2013, 09:13 PM
Last Post: Danny Farley
  Easter Sunday Basic Trigs (HP-12C) Gerson W. Barbosa 29 8,404 04-04-2013, 02:19 PM
Last Post: Gerson W. Barbosa
  Good deal : HP 12c Platinum for half-price Mic 1 1,386 01-21-2013, 03:51 AM
Last Post: Vincent Guilbault
  Simple financial problem with a HP-12c Platinum Lapin 3 1,545 11-11-2012, 09:33 AM
Last Post: Lapin
  HP-12C program Gerson W. Barbosa 5 1,946 02-22-2012, 04:12 AM
Last Post: Gerson W. Barbosa
  HP 12C Platinum CHS bug? M. Joury 23 4,939 08-11-2011, 06:45 PM
Last Post: Gerson W. Barbosa
  HP 12C, 12C Platinum & 15C iOS App Walter Lam 2 1,369 06-02-2011, 01:25 PM
Last Post: Andrés C. Rodríguez (Argentina)

Forum Jump: