Hi,
I've written many maths functions in focal programs
and many of them are in the HP-41C library.
A few years ago, I began to study M-Code
and among the routines I wrote, there are for instance:
-Hyperbolic functions and their inverses ( of course )
-FLOOR , X+1 , X-1 , XROOT , Y^X that returns 0^0 = 1
-CBRT ( cube root that returns an integer if the argument is
the cube of an integer )
-Gamma function
-Hypergeometric functions
-Kampé de Fériet functions ( hypergeometric functions of 2 variables )
-DOT & CROSS products, norm of a 3-D vector.
-Product, quotient, square, square-root, inverse of complex numbers.
-Carlson elliptic integrals
-A test that I've named X#Y?? that skips the following line
if X is approximately equal to Y
( to avoid infinite loops when using Newton's method for example )
-Linear regression & linear estimate
-Discrete Hartley Transform
Most of these have been sent to the MoHPC and they probably appear
in the museum at the next update.
I've sent 69 new or updated pages to Dave since 2007
but I don't know when he makes the next update.
These programs are not all written in M-Code, but several however.
Some of them are also for the HP-48.
-By the way, what functions do you have in your own ROM ?
In my HP-41, there are ( currently ) - all in block F
-5 focal programs "EE" equatorial-ecliptic conversion
"KPL" to solve Kepler's equation
"GEO" to compute geocentric coordinates
"R-S" & "S-R" rectangular-spherical conversion
-And 59 M-code routines, namely:
LCB to perform the calculations needed to play "le compte est bon"
that is a French TV game
SQRTF square root of n! ( I've remarked that the HP-41 calculates
99! correctly )
GAM gamma function
RND0 rounds X to the nearest integer
J2000 computes the number of days since 2000/01/01
STOW and RCLW ( extra-registers )
HGF+ hypergeometric function ( including regularized functions )
KdF ----------------------- of 2 variables
SH CH TH ASH ACH ATH ( hyperbolics )
FLOOR
FRC2 that returns x - floor(x)
X+1 X-1
X/2
CBRT
RAND a random number generator that uses the TIME module
XROOT
Y^X
AA and BB which are 2 functions to play TONEs
( I've used them in a program that plays the Star Spangled Banner )
X=N? to test if a number is an integer
X#Y??
8X/5 that simply calculates 8 x / 5 ( useful for 3-point Gaussian integration )
DOT CROSS NORM
VM View Mantissa ( actually written by Ken Emery )
SORT that sorts numbers in contiguous registers
( This routine is already in the 41C-library )
LCO to move or swap a block of registers
MN? to play faster "mastermind" ( or "superbagel" )
3X X/3 and X^3
RF RJ RFZ RJZ ( Carlson elliptic integrals )
CNK to compute binomial coefficients
ST<>A to swap registers X Y Z and synthetic M N O
PR? that tests if a number is a prime
9999999967 is tested in 7m10s
Z*Z Z/Z Z^2 SQRTZ 1/Z ( complex operations )
CARD that simply returns a pseudo-random integer between 0 and 12
DEG F to return the degree of a polynomial from its control number
and several constants:
GAMMA Euler constant
MAXR 9.999999999 E99
TINY E-07
KG gauss' gravitational constant
OB obliquity of the ecliptic on J2000.0
HUBBLE Hubble's constant ( more exactly Hubble's time )
-Almost all of them should appear soon in the museum.
Best regards,
Jean-Marc.