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
|`(sum_products x0 y0 x1 y1 ...)`|`x0*y0 + x1*y1 + ...`| even number of operands |
394
+
|`(diff_of_products a b c d)`|`a*b - c*d`| all real inputs |
395
+
396
+
Polynomial forms preserve Horner and rational-polynomial evaluation structure.
397
+
Simple has flat operands, so rational polynomials use a numerator coefficient
398
+
count after `x`; polynomial coefficients are constant-first. Bernstein and
399
+
de Casteljau operations carry curve-basis semantics and belong in curve-level
400
+
crates such as `hypercurve`.
401
+
402
+
| Form | Meaning | Domain |
403
+
| --- | --- | --- |
404
+
|`(eval_poly x c0 c1 c2 ...)`|`c0 + c1*x + c2*x^2 + ...` in Horner form | at least one coefficient |
405
+
|`(eval_rational_poly x n c0 ... d0 ...)`| numerator polynomial divided by denominator polynomial; `n` is numerator coefficient count | exact non-negative integer `n`, at least one denominator coefficient, non-zero denominator value |
406
+
407
+
Scalar vector-length forms route through the exact dot-product reducers before
408
+
taking square roots, so rational Pythagorean cases can stay exact:
409
+
410
+
| Form | Meaning | Domain |
411
+
| --- | --- | --- |
412
+
|`(hypot2 x y)`|`sqrt(x^2 + y^2)`| all real inputs |
413
+
|`(hypot3 x y z)`|`sqrt(x^2 + y^2 + z^2)`| all real inputs |
414
+
415
+
Root and exact rational-power forms preserve perfect rational roots before
416
+
falling back to exact-real rational exponents:
417
+
418
+
| Form | Meaning | Domain |
419
+
| --- | --- | --- |
420
+
|`(cbrt x)`| cube root of `x`| all real inputs |
421
+
|`(root_n x n)`| nth root of `x`| exact positive integer `n`; negative `x` requires odd `n`|
422
+
|`(pow_rational x q)`|`x^q` with exact rational exponent `q`| all positive `x`; negative `x` requires an odd denominator |
423
+
424
+
Certified integer forms make discontinuous decisions through exact rational
425
+
shortcuts or bounded exact-real comparison. If a boundary cannot be certified,
426
+
they return `Problem::Exhausted` rather than rounding through a primitive float:
|`(rem_euclid_certified x m)`| Euclidean remainder for positive modulus | certifiable `m > 0` and quotient floor |
436
+
367
437
Normal-distribution forms use the same `Real` methods as Rust callers:
368
438
369
439
| Form | Meaning | Domain |
@@ -399,15 +469,25 @@ Normal-distribution forms use the same `Real` methods as Rust callers:
399
469
|`(normal_interval_moment lo hi n)`| unnormalized raw moment over `[lo, hi]`| exact non-negative integer `n`, finite bounds with `abs(bound) <= 10` and `lo <= hi`|
400
470
|`(truncated_normal_mean lo hi)`| mean of a standard normal truncated to `[lo, hi]`| finite bounds with `abs(bound) <= 10` and `lo < hi`|
401
471
|`(truncated_normal_variance lo hi)`| variance of a standard normal truncated to `[lo, hi]`| finite bounds with `abs(bound) <= 10` and `lo < hi`|
472
+
|`(gamma x)`| gamma function `Gamma(x)`| exact integer or half-integer `x`, excluding non-positive integer poles |
473
+
|`(lgamma x)`| natural log of `abs(Gamma(x))`| exact integer or half-integer `x`, excluding non-positive integer poles |
474
+
|`(beta a b)`| beta function `B(a, b)` through gamma closed forms | exact integer or half-integer arguments whose gamma ratio is defined |
475
+
|`(ln_beta a b)` / `(lbeta a b)`| natural log of `abs(B(a, b))`| exact integer or half-integer arguments whose gamma ratio is defined |
476
+
|`(regularized_beta a b x)`| regularized incomplete beta `I_x(a, b)`| exact positive integer `a` and `b`, `0 <= x <= 1`|
477
+
|`(regularized_beta_q a b x)`| complement `1 - I_x(a, b)`| exact positive integer `a` and `b`, `0 <= x <= 1`|
402
478
|`(regularized_gamma_p a x)`| regularized lower incomplete gamma `P(a, x)`| exact positive integer or half-integer `a`, `x >= 0`|
403
479
|`(regularized_gamma_q a x)`| regularized upper incomplete gamma `Q(a, x)`| exact positive integer or half-integer `a`, `x >= 0`|
404
480
|`(chi_square_cdf x k)`| chi-square CDF with `k` degrees of freedom |`x >= 0`, exact positive integer `k`|
405
481
|`(chi_square_sf x k)`| chi-square upper-tail probability |`x >= 0`, exact positive integer `k`|
406
482
407
483
Inputs outside those supported numeric ranges return `Problem` rather than silently
408
484
falling back to primitive floating point.
409
-
`ln_1p`/`log1p`, `ln_1m`/`log1m`, `logit`, and `tan_pi` return
485
+
`ln_1p`/`log1p`, `ln_1m`/`log1m`, `logsubexp`, `logit`, and `tan_pi` return
410
486
`Problem::NotANumber` outside their open domains.
487
+
`sqrt1pm1` and `sqrt1m1` return `Problem::SqrtNegative` when their radicand is
488
+
known negative.
489
+
`root_n` rejects degree zero and even roots of negative values; `pow_rational`
490
+
inherits the existing negative-base rational exponent policy.
0 commit comments