You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2d5b90a
Browse filesBrowse the repository at this point in the historyBrowse files
gcd and lcm compile at whole arguments; the binders are refused alike, saying to evaluate first (#2443)
gcd and lcm compile in FastExpression and in the LINQ compiler, over Complex
and over double: exactly at whole arguments, rounded once by EFloat, and NaN
at any other. Evaluation takes them over the rationals too, but a compiled
argument is a double, and the double nearest 0.1 is not 1/10. A whole double
past 2^53 is read as the integer it is. Both are non-negative, as evaluation
gives them: gcd(-4, 6) = 2, gcd(0, 5) = 5, gcd(0, 0) = 0, lcm(-4, 6) = 12,
lcm(0, 3) = 0. gcd(12, 18, 8) is gcd(gcd(12, 18), 8) and compiles nested.
The calculus nodes and the binders -- derivative, integral, limit, sum,
product, a sum, a maximum, a minimum, argmax and argmin over a set, apply and
lambda -- stay refused with UncompilableNodeException, by one check both
compilers run, whose message names the node and says to call .Evaled or
Simplify() first and compile the result. The LINQ compiler said the bound
variable was not among the arguments, and FastExpression asked for a bug
report for a sum, a product or a lambda.
The tests compare all three compiled forms with evaluation exactly, as
doubles, at every pair of 14 whole arguments, among them -12, 0, 2^60,
3 * 2^58 and two numbers near 10^15 whose lcm is past 2^53; check NaN at
1/2, 5/2, -3/2, i, 1 + i, NaN and infinity beside 0, 1 and 6; and assert the
refusal and its message for each binder in both compilers, and that the
evaluated expression compiles.
gcd(x, 6) at 4, by Compile: UncompilableNodeException (2.7.0), (2, 0) now.
Part of #2195.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
public static System.Numerics.Complex HarmonicNumber(System.Numerics.Complex a, System.Numerics.Complex b) => AngouriMath.Numerics.PolygammaFunction.HarmonicNumber(a, b);
267
267
public static double HarmonicNumber(double a, double b) => AngouriMath.Numerics.PolygammaFunction.HarmonicNumber(a, b);
268
268
269
-
// The functions of a factorisation, the valuation, the n-th prime and the prime-counting function, by the
0 commit comments