polpak
polpak,
an Octave code which
evaluates a variety of mathematical functions, polynomials, and
sequences, including Bell, Benford, Bernoulli, Bernstein, Cardan,
Catalan, Charlier, Chebyshev, Collatz, Delannoy, Euler, Fibonacci,
Gegenbauer, Gudermannian, Harmonic, Hermite, Hofstadter, Jacobi,
Krawtchouk, Laguerre, Lambert, Legendre, Lerch, Meixner, Mertens,
Moebius, Motzkin, Phi, Stirling, Tau, Tribonacci, Zernike.
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the MIT license.
Languages:
polpak is available in
a C version and
a C++ version and
a Fortran90 version and
a MATLAB version and
an Octave version and
a Python version
Related Data and Programs:
polpak_test
Source Code:
-
agm_values.m,
returns selected values of the arithmetic geometric mean function.
-
agud.m,
evaluates the inverse Gudermannian function;
-
align_enum.m,
counts the alignments of two sequences of M and N elements;
-
bell.m,
evaluates the Bell numbers;
-
bell_poly_coef.m,
returns the coefficients of a Bell polynomial;
-
bell_values.m,
evaluates some values of the Bell numbers;
-
benford.m,
returns the Benford probability of one or more significant digits;
-
bernoulli_number.m,
returns the Bernoulli numbers;
-
bernoulli_number_values.m,
returns some values of the Bernoulli numbers;
-
bernoulli_number2.m,
returns the Bernoulli numbers;
-
bernoulli_number3.m,
computes the Bernoulli numbers;
-
bernoulli_poly.m,
evaluates a Bernoulli polynomial;
-
bernoulli_poly2.m,
evaluates the Nth Bernoulli polynomial at X;
-
bernstein_poly.m,
evaluates the Bernstein polynomials at a point;
-
bernstein_poly_01_values.m,
returns some values of the Bernstein polynomials;
-
beta_values.m,
returns some values of the Beta function;
-
bpab.m,
evaluates the Bernstein polynomials defined on the interval [A,B];
-
cardan_poly.m,
evaluates the Cardan polynomials;
-
cardan_poly_coef.m,
returns the coefficients of a Cardan polynomial;
-
cardinal_cos.m,
evaluates the cardinal cosine basis functions.
-
cardinal_sin.m,
evaluates the cardinal sine basis functions.
-
catalan.m,
evaluates the Catalan numbers;
-
catalan_row_next.m,
computes the next row of Catalan numbers;
-
catalan_values.m,
evaluates some values of the Catalan numbers;
-
charlier.m,
evaluates the Charlier polynomials;
-
cheby_t_poly.m,
evaluates the Chebyshev T polynomials;
-
cheby_t_poly_coef.m,
returns the coefficients of the Chebyshev T polynomials;
-
cheby_t_values.m,
returns some values of the Chebyshev T polynomials;
-
cheby_t_poly_zero.m,
returns the zeros of the Chebyshev T polynomials;
-
cheby_u_poly.m,
evaluates the Chebyshev U polynomials;
-
cheby_u_poly_coef.m,
returns the coefficients of the Chebyshev U polynomials;
-
cheby_u_values.m,
returns some values of the Chebyshev U polynomials;
-
cheby_u_poly_zero.m,
returns the zeros of the Chebyshev U polynomials;
-
chebyshev_discrete.m,
evaluates the discrete Chebyshev polynomials;
-
collatz_count.m,
counts the length of the Collatz sequence for a seed of N;
-
collatz_count_max.m,
seeks the maximum Collatz count from 1 to N.
-
collatz_count_values.m,
stores some values of the Collatz count function;
-
comb_row_next.m,
computes the next row of Pascal's triangle;
-
commul.m,
computes a multinomial coefficient;
-
complete_symmetric_poly.m,
evaluates the complete symmetric polynomial tau(n,r).
-
conway_sequence.m,
evaluates the first N entries of the Conway challenge sequence;
-
cos_power_int.m,
returns the value of the integral of the N-th power of
the cosine function;
-
cos_power_int_values.m,
returns some values of the integral of the N-th power of
the cosine function;
-
delannoy.m,
computes the Delannoy numbers;
-
domino_tiling_num.m,
computes the the number of ways of tiling an MxN chessboard
with dominoes.
-
erf_values.m,
returns some values of the error function;
-
erfc_estimate.m,
estimates the complementary error function using asymptotic expansion;
-
erfc_values.m,
returns some values of the complementary error function;
-
euler_mascheroni.m,
returns the value of the Euler-Mascheroni constant;
-
euler_number.m,
evaluates the Euler numbers;
-
euler_number2.m,
computes the Euler numbers;
-
euler_number_values.m,
returns some values of the Euler numbers;
-
euler_poly.m,
evaluates the N-th Euler polynomial at X;
-
eulerian.m,
computes the eulerian number E(N,K);
-
f_hofstadter.m,
computes the Hofstadter F function;
-
fibonacci_direct.m,
computes the N-th Fibonacci number directly;
-
fibonacci_floor.m,
computes the largest Fibonacci number less than or equal to N;
-
fibonacci_recursive.m,
computes the first N Fibonacci numbers recursively;
-
g_hofstadter.m,
computes the Hofstadter G function;
-
gamma_values.m,
returns some values of the Gamma function;
-
gamma_log_values.m,
returns some values of the logarithm of the Gamma function;
-
gegenbauer_poly.m,
evaluates the Gegenbauer polynomials at a point;
-
gegenbauer_poly_values.m,
returns some values of the Gegenbauer polynomials;
-
gen_hermite_poly.m,
evaluates the generalized Hermite polynomials;
-
gen_laguerre_poly.m,
evaluates the generalized Laguerre polynomials;
-
gud.m,
evaluates the Gudermannian function;
-
gud_values.m,
returns some values of the Gudermannian function;
-
h_hofstadter.m,
computes the Hofstadter H function;
-
hail.m,
computes the hail function;
-
hermite_poly_phys.m,
evaluates the Hermite physicist polynomials;
-
hermite_poly_coef.m,
evaluates the Hermite polynomial coefficients;
-
hermite_poly_phys_values.m,
returns some values of the Hermite physicist polynomials;
-
hyper_2f1_values.m,
returns some values of the 2F1 hypergeometric function.
-
i4_factor.m,
factors an integer into prime factors;
-
i4_factorial2.m,
computes the double factorial function;
-
i4_factorial2_values.m,
returns some values of the double factorial function;
-
i4_is_fibonacci.m,
determines whether an integer is a Fibonacci number;
-
i4_is_prime.m,
determines whether an integer is prime;
-
i4_is_triangular.m,
determines whether an integer is triangular;
-
i4_mop.m,
evaluates a power of -1;
-
i4_partition_distinct_count_values.m,
computes the value of Q(N);
-
i4_to_triangle_lower.m,
converts an integer to lower triangular coordinates;
-
i4_to_triangle_upper.m,
converts an integer to upper triangular coordinates;
-
i4_uniform_ab.m,
returns a random integer in a given range;
-
i4mat_print.m,
prints an I4MAT;
-
i4mat_print_some.m,
prints some of an I4MAT;
-
jacobi_poly.m,
evaluates the Jacobi polynomials at a point;
-
jacobi_poly_values.m,
returns some values of the Jacobi polynomials;
-
jacobi_symbol.m,
evaluates the Jacobi symbol (Q/P);
-
krawtchouk.m,
evaluates the Krawtchouk polynomials;
-
laguerre_associated.m,
evaluates the associated Laguerre polynomials L(N,M)(X);
-
laguerre_poly.m,
evaluates the Laguerre polynomials;
-
laguerre_poly_coef.m,
evaluates the Laguerre polynomial coefficients;
-
laguerre_polynomial_values.m,
returns some values of the Laguerre polynomials;
-
lambert_w.m,
evaluates the Lambert W function;
-
lambert_w_estimate.m,
estimates the Lambert W function;
-
lambert_w_values.m,
returns some values of the Lambert W function;
-
legendre_associated.m,
evaluates the associated Legendre functions P(N,M)(X);
-
legendre_associated_values.m,
returns some values of the associated Legendre function;
-
legendre_associated_normalized.m,
evaluates the associated Legendre functions P(N,M)(X),
normalized for use in spherical harmonic calculations;
-
legendre_associated_normalized_sphere_values.m,
returns some values of the associated Legendre function
normalized for use in spherical harmonic calculations;
-
legendre_function_q.m,
evaluates the Legendre functions Q(N)(X);
-
legendre_function_q_values.m,
returns some values of the Legendre Q(N) functions;
-
legendre_poly.m,
evaluates the Legendre polynomials P(N)(X);
-
legendre_poly_coef.m,
evaluates the coefficients of the Legendre polynomials P(N)(X);
-
legendre_poly_values.m,
returns some values of the Legendre polynomials;
-
legendre_symbol.m,
evaluates the Legendre symbol (Q/P);
-
lerch.m,
evaluates the Lerch transcendent function;
-
lerch_values.m,
returns some values of the Lerch transcendent function;
-
lock.m,
returns the number of codes for a lock with N buttons;
-
meixner.m,
evaluates the Meixner polynomials;
-
mertens.m,
returns the value of the Mertens function;
-
mertens_values.m,
returns some tabulated values of the Mertens function;
-
moebius.m,
returns the value of MU(N), the Moebius function of N;
-
moebius_values.m,
returns some tabulated values of the Moebius function;
-
motzkin.m,
returns the Motzkin numbers up to order N;
-
normal_01_cdf_inverse.m
inverts the Normal 01 CDF.
-
normal_01_cdf_values.m
returns some values of the Normal 01 CDF.
-
omega.m,
returns the number of distinct prime divisors of an integer;
-
omega_values.m,
returns some values of the Omega function;
-
partition_distinct_count_values.m,
returns some values of Q(N);
-
pentagon_num.m,
returns the N-th pentagonal number;
-
phi.m,
returns the number of relatively prime predecessors of an integer;
-
phi_values.m,
returns some values of the Phi function;
-
plane_partition_num.m,
returns the number of plane partitions of an integer.
-
poly_bernoulli.m,
evaluates the poly-Bernoulli numbers of negative index;
-
poly_coef_count.m,
counts the coefficients in a polynomial of given degree and dimension.
-
prime.m,
returns any of the first MAXPRIME primes;
-
psi_values.m,
returns some values of the Psi function;
-
pyramid_num.m,
returns the N-th pyramidal number;
-
pyramid_square_num.m,
returns the N-th pyramidal square number;
-
r8_agm.m,
computes the arithmetic geometric mean of two numbers;
-
r8_beta.m,
evaluates the Beta function;
-
r8_erf.m,
evaluates the error function;
-
r8_erf_inverse.m,
inverts the error function;
-
r8_factorial_log.m,
computes the logarithm of the (real) factorial function;
-
r8_factorial_log_values.m,
returns some values of the logarithm of the (real) factorial function;
-
r8_hyper_2f1.m,
evaluates the 2F1 hypergeometric function.
-
r8_psi.m,
returns the Psi function;
-
r8_uniform_01.m,
returns a unit pseudorandom R8;
-
r8_uniform_ab.m,
returns a pseudorandom R8 in [A,B];
-
r8poly_degree.m,
returns the degree of a polynomial;
-
r8poly_print.m,
prints a polynomial;
-
r8poly_value_horner.m,
evaluates a polynomial using Horner's method;
-
r8vec_linspace.m,
returns evenly spaced values from A to B as an R8VEC.
-
r8vec_print.m,
prints an R8VEC.
-
s_len_trim.m,
returns the length of a string to the last nonblank;
-
sigma.m,
returns the value of SIGMA(N), the divisor sum;
-
sigma_values.m,
returns some values of the Sigma function;
-
simplex_num.m
-
sin_power_int.m,
returns the value of the integral of the N-th power of
the sine function;
-
sin_power_int_values.m,
returns some values of the integral of the N-th power of
the sine function;
-
slices.m,
maximum number of pieces created by a given number of slices.
-
spherical_harmonic.m,
evaluates the spherical harmonic function;
-
spherical_harmonic_values.m,
returns some values of the spherical harmonic function;
-
stirling_estimate.m,
approximates n! using Stirling's estimate.
-
stirling1_table.m,
tabulates the Stirling numbers of the first kind;
-
stirling2_number.m,
evaluates a Stirling number of the second kind;
-
stirling2_row.m,
evaluates all the Stirling numbers of the second kind for a given n;
-
stirling2_table.m,
tabulates the Stirling numbers of the second kind;
-
tau.m,
evaluates the Tau function, the number of distinct divisors;
-
tau_values.m,
returns some values of the Tau function;
-
tetrahedron_num.m,
returns the N-th tetrahedral number;
-
timestamp.m,
prints the current YMDHMS date as a timestamp;
-
triangle_num.m,
returns the N-th triangle number;
-
triangle_lower_to_i4.m,
converts a lower triangular coordinate to an integer;
-
triangle_upper_to_i4.m,
converts an upper triangular coordinate to an integer;
-
tribonacci_direct.m,
computes the Nth Tribonacci number directly;
-
tribonacci_recursive.m,
computes the first N Tribonacci numbers recursively;
-
tribonacci_roots.m,
computes the roots of the Tribonacci cubic equation.
-
trinomial.m,
computes a trinomial coefficient;
-
v_hofstadter.m,
computes the Hofstadter V function;
-
vibonacci.m,
computes the Vibonacci numbers;
-
zeckendorf.m,
produces the Zeckendorf decomposition of a positive integer;
-
zernike_poly.m,
evaluates a Zernike polynomial;
-
zernike_poly_coef.m,
returns the coefficients of a Zernike polynomial;
-
zeta_m1.m,
approximates the Riemann Zeta Minus One function;
-
zeta_m1_values.m,
returns some stored values of the Riemann Zeta Minus
One function;
-
zeta_naive.m,
approximates the Riemann Zeta function;
-
zeta_values.m,
returns some stored values of the Riemann Zeta function;
Last revised on 27 March 2024.