HP Prime Collection of Functions
Introduction
The program COLLECTION has 13 historical, archaic, and
unusual functions. They are:
Name
|
Function and Syntax
|
Formula Used
|
Versine
|
VERS(X)
|
1 – cos x
|
Coversine
|
COVERS(X)
|
1 – sin x
|
Haversine
|
HAV(X)
|
sin(x/2)^2
|
Normalized Sampling
|
NSINC(X)
|
sin(π * x)/(π * x)
|
Exsecant
|
EXSEC(X)
|
sec x - 1
|
Gundermannian
|
GD(X)
|
atan(sinh x)
|
Inverse Gundermannian
|
INVGD(X)
|
asinh(tan x)
|
Dilogarithm
|
DILN(X)
|
∫
(ln t / (t – 1) dt, 1, x)
|
Exponential Polynomial
|
EPOLY(N, X)
|
Σ(x^j / j!, j, 0, n)
|
Hypotenuse of a Right Triangle
|
HYPER(A,B)
|
√(a^2 + b^2)
|
Langevin Function
|
LANGEVIN(X)
|
1/tanh x – 1/x
|
General Mean Function
|
GENMEAN(N,A,B)
N = 1, arithmetic mean
N = 2, root mean square
N = -1, harmonic mean
|
((a^n + b^n) / 2)^(1/n)
|
Logarithmic Integral
|
Li(X)
|
Ei(LN(x))
|
Radians mode is assumed.
Note: All the
functions listed above can be called separately. Note that there is no COLLECTION program per
se, it is file that contains all the functions.
HP Prime Program:
COLLECTION
//
2018-01-28 EWS
//
A collection of functions
//
An Atlas of Functions-2nd Ed-2009
//
Note the COLLECTION is a file
//
EXPORT can't have a ; attached in this case
EXPORT
VERS(X)
BEGIN
//
versine
RETURN
1-COS(X);
END;
EXPORT
COVERS(X)
BEGIN
//
coversine
RETURN
1-SIN(X);
END;
EXPORT
HAV(X)
BEGIN
//
haversine
RETURN
SIN(X/2)^2;
END;
EXPORT
NSINC(X)
BEGIN
//
normalized sampling
RETURN
SIN(π*X)/(π*X);
END;
EXPORT
EXSEC(X)
BEGIN
//
exsecant
RETURN
SEC(X)-1;
END;
EXPORT
GD(X)
BEGIN
//
Gundermannian
RETURN
ATAN(SINH(X));
END;
EXPORT
INVGD(X)
BEGIN
//
Inverse Gundermannian
RETURN
ASINH(TAN(X));
END;
EXPORT
DILN(X)
BEGIN
//
dilogarithm
RETURN
∫(LN(T)/(T-1),T,1,X);
END;
EXPORT
EPOLY(N,X)
BEGIN
//
exponential polynomial
//
order, value
RETURN
Σ(X^J/J!,J,0,N);
END;
EXPORT
HYPER(A,B)
BEGIN
//
hypotonuse of a right
//
triangle
RETURN
√(A^2+B^2);
END;
EXPORT
LANGEVIN(X)
BEGIN
//
Langevin function
RETURN
1/TANH(X)-1/X;
END;
EXPORT
GENMEAN(N,A,B)
BEGIN
//
General mean
//
N = 1, arithmetic mean
//
N = 2, root mean square
//
N = −1, harmonic mean
RETURN
((A^N+B^N)/2)^(1/N);
END;
EXPORT
Li(X)
BEGIN
//
Logathmic Integral
RETURN
CAS.Ei(LN(X));
END;
Source:
Keith
Oldham, Jan Myland, and Jerome Spainer. An
Atlas of Functions 2nd
Edition. Springer: New York.
2009 e-ISBN 978-0-387-48807-3
Eddie
This
blog is property of Edward Shore, 2018.