Skip to content

MathCAS v2 0.16.0

Choose a tag to compare

@github-actions github-actions released this 17 Nov 06:11
· 37 commits to main since this release

macOS on Intel. The disk image is also built for Macs with an Intel processor
(MathCAS-v2-<version>-macos-x64.dmg), beside the one for Apple Silicon.

Changes that old input will notice. They settle the language before 1.0.

Names. Predicates are is_*: the 27 that ended in _q are renamed (interval_member_q is
is_interval_member). Option values and mode arguments are lower-case names, not strings: method: newton,
direction: from_above, axis_object([horizontal, 0]). A string stays only where its spelling is fixed from
outside (a file format, a colour scheme, a plot theme). In notebooks the labels are in N and out N and cell
style names are lower case; a notebook written with the old names is converted when it is opened.

Failures and loops. A failure that is called is that failure: f(1) where f is a failure gives the
failure instead of a call that stays as written. break() and continue() are read by map, table,
select, fold and the other iterating functions, in their parallel forms too. table() without a body stays
unevaluated.

Monitors are functions. evaluation_monitor and step_monitor take a function of the current values;
there are no held option values. Anything else is failure(not_a_function, ...), and a function that has no
monitor says unknown_option (the function plots). find_fit and the Taylor method of n_dsolve now call
monitors.

Only proved answers. The property functions (function_injective, function_sign,
function_monotonicity, function_convexity and the others) answer from enclosures, exact values, composition
rules and limits. Where a sampled answer was given before and no proof is found, the call stays unevaluated.
Functions of several intervals use the corner rule only when every derivative sign is proved over the box.

Work, not seconds. The budgets of integration, limits, d_solve, simplify, sums and the decision service
count operations instead of time, so an answer does not depend on the speed of the machine or on what else it is
doing.

Plots. Plots draw no grid lines unless grid_lines asks for them; grid_lines: automatic gives the grid
they drew before (at the ticks, on logarithmic axes at the powers of ten). show of several plots ticks the
combined picture afresh for the range that holds them all (or the plot_range given to show), and pointing at
it in the notebook snaps to the curves and points of every plot, as on a single plot.

Interrupts. Drawing a picture honours an interrupt within a quarter of a second (sampling, meshing and
writing the picture), and so does prime_pi of a large argument.

Wrong answers corrected. Found by testing exact and proved answers against high-precision numbers:
acot, fractional_part and mod of an interval across a jump gave too small an image (they stay unevaluated);
a limit could take a constant that is zero for its leading term; series of sawtooth_wave and square_wave
at a jump gave one side only; function_monotonicity and function_convexity answered across the gaps of a
domain of several pieces (tan on x > 0); hypergeometric_1f1(-2, -2, z); legendre_p of integer order at
high precision; Laguerre, Jacobi, Gegenbauer and Hermite polynomials at a degree given as a machine number;
mittag_leffler_e with integer parameters; the digits claimed by a numerical derivative. In the language: a
failure assigned to a part of a list is held by the list, an assignment never stores break(), match reads a
failure as data, and break()/continue() work in map over an association and in array and outer.

More of the same kind, from checking numerical and exact answers independently: n_integrate lost the mass
at a singular end that is not 0 ((1 - x)^(-2/3) on 0 to 1 gave 2.9999879 as converged); find_root at high
precision could claim digits it did not have; sum(x^k, [k, -inf, inf]) gave 0; simplify gave 0 for
gamma(x + 1)/gamma(x) - sqrt(x^2); the series of asinh(1/x) for negative x; series of the Hankel
functions at 0. Assignments to a span, to several positions or to a column (l[2:4] = 0, m[all, 2] = v) did
nothing; they set every selected part, and a position outside the list is a failure.

Property answers are exact at their boundaries: function_bijective(x^3 + a*x^2 + b*x + c, x) is
a^2 - 3*b <= 0 (the boundary was left out); function_injective no longer uses one sign of the derivative
over separate intervals; convexity with a parameter sees the poles; function_analytic(sqrt(x^2), x) is false
and abs(x^2) is analytic; strict monotonicity of x^3 is answered.

Faster. A small input takes about a tenth of the time it took (parsing no longer starts a thread per
input); a plot draws its PDF and print versions when an export first asks for them; plots of large rasters no
longer print them; sign of a complex constant, root counts with gamma and matrix_exp of a matrix logarithm
are much quicker. A kernel on a busy machine answers a small input as fast as on an idle one; table over
ranges of machine numbers compiles its body (a million elements in a tenth of a second); large 3D pictures
are read and written in about half the time.

Sums carry their conditions. An infinite sum or product with a parameter gives a conditional_expression
with its condition of convergence (sum(p^k/k, [k, 1, inf]) holds for abs(p) < 1 and at p == -1);
generate_conditions: false gives the value alone, and a condition that the assumptions imply is dropped.

Notebook format version. The first line of a .mcn file names the format version. A file of a newer minor
version opens with a warning; one of a newer major version is refused with a message that says so.

Limits of memory and time. simplify, factor and the other functions that walk a term visit a shared
subterm once, so a deeply nested value with shared parts no longer takes exponential time. to_string of a value too large to print gives failure(limit, memory);
polynomial_gcd, together, cancel and expand of very large inputs are faster and honour an interrupt;
n_dsolve's Taylor method stops at the end of its range. Function plots call an evaluation_monitor.

More answers. Poles of a function composed with a polynomial (gamma(x^3 - x/3) in a disc); root counts of
functions with poles and of Bessel, Airy and gamma functions; products that are q-Pochhammer symbols; expansions
at infinity of the error, Fresnel, sine and cosine integral, Hankel, Whittaker and polylogarithm functions; many
closed forms in function_expand; elliptic_f at a complex amplitude to any precision; bessel_j with an
interval order; number theory under assumptions in refine (distinct primes are coprime, Fermat, Wilson);
piecewise_expand of ramp, unit_box, unit_triangle, floor, mod and the other step functions; areas of
Boolean combinations of plane regions; symbolic Cholesky factors; facts about primes, algebraic and complex
numbers in conditions. Heun functions at singular points; Ferrers functions of the second kind with an order;
Zernike functions and spherical harmonics off the integers; centered intervals with complex parts for the
Fresnel, Hankel, gamma and zeta functions; Bessel functions of half-integer order in elementary functions;
recurrences solved by products over several steps and by the recurrences of orthogonal polynomials and Bessel
functions; sums of two, four and eight squares as divisor sums; images of the principal branches of the inverse
functions; series at the singular points of acsch, asech and acoth. Proved complex boxes of the
Weierstrass and modular functions; alternating series of rational functions; sums of Bell and Stirling numbers;
general series coefficients; sums of squares above degree 2 with an exact certificate; eigenvectors and singular
value decompositions of high-precision matrices at their precision; refine joins facts about several symbols
(a > 0 from a > b and a > -b); find_instance proves an empty answer over the integers.

Roots of any function. root([f, x0]) with a function that is not a polynomial is an exact number: the
root near x0 is found and proved on a box, real or complex, n gives it to any precision, and it is refused
at a double root, without a root nearby or on a branch cut. solve, reduce and n_solve give such roots
for one analytic equation in a bounded region, and arg_max, arg_min, max_value, min_value, maximize
and minimize on a closed interval compare the proved values at the ends and at the roots of the derivative.
Also: proved ranges of oscillating functions (bessel_j(0, x), sinc); sequences reduced to one
difference_root; systems of recurrences with constant coefficients; asymptotic relations with parameters give
their conditions; Fibonacci and Lucas numbers of real index; Hankel transforms of more functions.

Also new. Proved images of more special functions on wide intervals; prime_pi up to 2^60;
hypergeometric functions (p+1)Fp beyond the unit circle; Lommel and Weber functions at exceptional orders;
eigenvectors of matrices with parameters; membership of a symbolic point in convex regions, cylinders, cones
and tori; list plots of several data sets; reduce in one integer variable; balanced Hankel transforms; double
sums along diagonals; Mathieu characteristic values at complex q.

Limits onto branch cuts and other corrections. A limit taken onto a branch cut of elliptic_e, elliptic_k,
bessel_y, product_log, gamma_regularized and nineteen more functions is the value on the side the limit
comes from. function_domain knows that heaviside_theta, round, floor, ceiling and the real-only
functions (clip, ramp, unit_step) are not defined or not continuous everywhere; piecewise_expand of
clip with symbolic bounds; sum_convergence on the boundary circle and at poles in a parameter; a second
definition f(g(_)) replaces the first; gather_by with a list of functions nests; solve keeps solutions
that contain arbitrary constants; shortest in replace_list tries the shortest match first; the display
writes a - b*im/c.

Pictures on demand. The kernel writes the picture files a front end asks for (pictures in an eval
request) and the others when a picture request names them; a client that does not ask gets every file as
before. 3D scenes are prepared and sorted faster; map over a long vector of machine numbers and array
compile their body.

New constants and methods. glaisher to any precision and directed_infinity; Boolean operations on mesh
regions and measures of implicit regions; find_instance over integers, primes and sums of squares;
complete_integral by characteristics; expansions at infinity of Struve, Kelvin, Mittag-Leffler and Lommel
functions; spheroidal eigenvalues of any degree and order; extrema on the whole line and on half-lines with
proved bounds on the tails; Hankel transforms of oscillating products, Casoratians, series coefficients with a
symbolic index; to_radicals up to degree 32.

More corrections. The real-only functions (clip, max, min, ramp, real_abs, real_sign,
unit_box, unit_step, unit_triangle) are defined over the complexes only at real arguments; domains at
special parameters of hypergeometric_0f1, gamma_regularized and Chebyshev functions; the conditions of
Hankel and inverse Mellin transforms; multiply_sides at zero; elliptic_pi(n, 0); sort_by with a list of
keys and ordering of an association; continued_fraction(golden_ratio) is [1, [1]]; solve keeps the
conditions of solution families; random convex polygons use memory linear in the number of vertices. The order
of a series at infinity is stated on the series page and every expansion follows it.

Closed forms and real roots. simplify takes a conjugate through sums, products and powers and knows the
mirror symmetry of real entire functions; special values of barnes_g, hyperfactorial, the Neville theta
functions and elliptic_e; one-sided limits of step functions; function_expand of more functions. solve,
n_solve and count_roots find every real root of one analytic equation on a line or half-line, with a proof
that none is missed, and split piecewise equations into branches; reduce takes cubics and quartics.
Confluent Heun equations in d_solve; conic optimizers with parameter equations; property tables of Lommel,
q-factorial and parabolic cylinder functions; table with a count bound by an earlier iterator.

Faster again. Machine values of log_barnes_g, hyperfactorial, lerch_phi and q_pochhammer(q);
interpolating functions and long Fourier transforms in one native call; nest, nest_list, fold and
fold_list over machine numbers compile; Khinchin's constant. The notebook asks for a picture's column twin
when it saves.

Linux. The desktop entries declare version 1.0 of the desktop entry specification.

Android. Screens fade in, the sheet and the bars at the bottom slide, and a page that is scrolled runs on when
the finger is lifted. A long press on a plot opens the share sheet with it; a shared plot is a sharp picture
(1600 pixels wide) whatever its size on the page. Interface text is a little larger, and plots made in the app
have labels of a size that reads on a phone (MC_PLOT_WIDTH sets the default width of a plot for a process).