28/48 used to validate scientific library



#5

Last night I was helping an HPGCC user build GSL (GNU Scientific Library) for the 50g. After I got it compiled I needed to create a simple test case and opted for a complex square root. When I read the documentation (http://www.gnu.org/software/gsl/manual/html_node/Complex-Numbers.html) this gem was present:

Quote:
For multiple-valued functions the branch cuts have been chosen to follow the conventions of Abramowitz and Stegun in the Handbook of Mathematical Functions. The functions return principal values which are the same as those in GNU Calc, which in turn are the same as those in Common Lisp, The Language (Second Edition) and the HP-28/48 series of calculators.

The 28/48 was not the only source of validation, but interesting that it is mentioned and possibly implied as a trusted source.

#6

That's interesting. When I implemented the complex functions in Free42, I simply went with whichever branch cut was easiest to implement, and there may well be discrepancies between that and what the real HP-42S does. I wonder if its complex functions have the same behavior as the 28/48 series?


I'll have to study this. Fortunately one can download Abramowitz & Stegun nowadays!

- Thomas

#7

The complex numbers in Reckon and the uWatch take the branch cuts that agree with the hp15c (presumably the same as the 48).

the 15c manual claims these cuts were chosen so as to make the trigs and their inverses composed return the same original values.


#8

Same with CasioRPN (another RPN calculator for the Casio FX-9860 series). I'm lucky enough to have a paper copy of the HP-42 manual; I checked it against the HP-28 manual on the museum disk and the cuts / branch points chosen appeared identical in each. From a programming point of view I don't recall that they were all the most natural; it's unlikely that simply choosing cuts / branch points as one goes along would lead to the same results.

Nigel


#9

Nigel, are you referring to chapter 6 of the HP-42S manual? Could you point me to any specific examples in the manual that would give a clue as to which branch cuts the 42S uses?


In my 42S simulator, I chose the cuts that seemed the most natural, and I believe that my implementation returns results that are mathematically correct, but I would like to make sure that my implementation is faithful to the original calculator as well.

- Thomas


#10

My memory must be going! You are quite correct - although I do own the HP-42S manual (and the calculator), the information about branch points / cuts is not in there. I actually used the information in the HP-15C "Advanced Functions" manual. Comparing this with my HP-42S showed that the same branch points / cuts were used by both calculators, and also by the HP-28S.

Sorry for any confusion.

Nigel


#11

Thanks for the information! I don't have any paper manuals for the 15C but the PDF versions on the Museum DVD will do. :-)


I guess it makes sense for complex math to be consistent between all complex-capable HP models, but it's good to have confirmation.

- Thomas


Possibly Related Threads…
Thread Author Replies Views Last Post
  Library#4 Modules mass-update and New Overlays Ángel Martin 0 1,228 11-09-2013, 05:55 AM
Last Post: 'Angel Martin
  [HP Prime] Constants Library Values Timothy Roche 24 7,207 11-02-2013, 04:17 PM
Last Post: Les Koller
  [HP-Prime CAS] Vector Calculus Library CompSystems 7 2,695 10-31-2013, 12:48 PM
Last Post: Han
  Equation Library/App for the Prime Harold A Climer 3 1,697 10-30-2013, 10:14 AM
Last Post: CompSystems
  Equation Library on the PRIME Harold A Climer 0 1,038 10-26-2013, 10:01 AM
Last Post: Harold A Climer
  CASplus Library for HP-Prime CompSystems 1 1,193 10-05-2013, 12:44 AM
Last Post: CompSystems
  The Rich HP Calculator Library Eddie W. Shore 0 854 09-27-2013, 10:19 PM
Last Post: Eddie W. Shore
  So, latest 41CL / Library 4 config is... Gene Wright 4 1,974 09-22-2013, 02:59 AM
Last Post: Ángel Martin
  Cleaning exiting library programs patryk 2 1,293 09-14-2013, 12:36 PM
Last Post: patryk
  Problem loading library into emulator Tom Grydeland 2 1,335 09-08-2013, 08:42 AM
Last Post: Marcus von Cube, Germany

Forum Jump: