Native ExactTriangle splitting parameters #
The program computes the existing integer parameters sOf, queryCap, pieceSize and
numPieces. Both square roots call the charged native successive-squares program; all products,
quotients and ceilings are native instructions. The modulus is supplied separately by the outer
prime-selection host.
Main definitions #
Parameters.program: fixed fifteen-register parameter computation.
Main results #
Parameters.exec: exact outputs, explicit word fits, cost and an unchanged-memory frame.
Square-root input and arithmetic scratch.
Square-root result.
Input matrix side.
Target middle dimension.
Piece-size divisor.
Output floor square root of the middle dimension.
Output query chunk capacity.
Output maximum piece length.
Output number of pieces.
Square of the outer dimension.
Constant one, outside the square-root register bank.
Reused charged integer square root.
Runtime arithmetic between the square roots.
Both natural ceilings use the existing (a+b-1)/b convention, including zero divisors.
Fixed code; only the square-root loops depend on the runtime inputs.
Fixed native code and no physical-width reads.
Compute the finite splitting parameters from actual runtime dimensions. The two explicit
ceiling-addition fits cover their temporary sums, and the fourth-power bound covers the square
formed before dividing by D. The final halt is excluded.