/** * The scalar barrier's numerical core. Internal: not exported from the * package index, and nothing of its vocabulary (significands, exponents, * operation counts) appears on any public result. * * The arithmetic is the P66F/P66F-R repaired assembly, ported verbatim from * the Kitchen authority (`p66e-partd-core.ts` at the reviewed checkpoint): * * LOGARITHM `log1p((x-a)/a)` near activation, where the ratio logarithm * loses seven digits (Boost.Math documents the cancellation); * the ratio logarithm in the ordinary field; `log x - log a` * when the ratio itself leaves Float64. * ASSEMBLY exponent-tracked term products (a POSIX-`frexp`-style split * into a significand in [0.5, 1) and an integer exponent, read * from the bit pattern since JavaScript exposes no frexp), * summed at a common scale and rounded ONCE per output, with * single-rounding exponent application. There is no chunked * 2^±1000-class emission: the chunked form rounds on the * subnormal grid and then rounds again, which turns values as * representable as MIN_VALUE into zero — an availability error, * not merely an accuracy one. * * Evaluation is lazy by ORDER: a caller asking for order 0 must not pay for * a curvature it did not request. The operation counter (logarithms plus * scaled term products) makes 2 / 4 / 7 active and 0 inactive a measurement * rather than a claim. */ /** Highest derivative the caller wants. Lower orders skip later work. */ export type CoreOrder = 0 | 1 | 2; export interface CoreInputs { readonly coordinate: number; readonly activation: number; readonly stiffness: number; } export interface CoreOutputs { readonly active: boolean; /** `undefined` when not requested; non-finite when outside Float64. */ readonly energy: number | undefined; readonly firstDerivative: number | undefined; readonly secondDerivative: number | undefined; } /** Reads and clears the count of logarithms and scaled products performed. */ export declare function takeCoreOperationCount(): number; /** * Inputs are assumed already validated by the public contract; this is the * shared kernel, not a public entry point. */ export declare function evaluateBarrierCore(inputs: CoreInputs, order: CoreOrder): CoreOutputs; /** * The individual terms of each output, held AT SCALE, for the same-sign * identity gate. The contract carries no "premature intermediate failure" * arm, and that is a claim about the algebra: on the active domain every * output is a sum of terms of the SAME SIGN, so no term exceeds the * magnitude of the sum, so a term can overflow only when the output itself * does. The gate assembles this mirror through the SHIPPED combiner and * requires bit-identity with `evaluateBarrierCore`, so the mirror cannot * drift from the code it makes a claim about. */ export interface BarrierTermPartsView { readonly energy: readonly { significand: number; exponent: number; }[]; readonly firstDerivative: readonly { significand: number; exponent: number; }[]; readonly secondDerivative: readonly { significand: number; exponent: number; }[]; } export declare function barrierTermParts(inputs: CoreInputs): BarrierTermPartsView; /** The shipped same-signed assembler, exposed for the identity gate alone. */ export declare function assembleSameSigned(parts: readonly { significand: number; exponent: number; }[]): number; //# sourceMappingURL=clamped-log-barrier-core.d.ts.map