NF Elementwise Bounds: Core Arithmetic Budgets #
Per-entry bound tensor for addition.
add_bound_tensor epsx epsy xR yR computes an elementwise error budget for xR + yR. Its
linfNorm
is used as the output epsilon in approxTensor_add_spec.
Instances For
Per-entry bound tensor for subtraction.
Analogous to addBoundTensor, but for xR - yR (and the corresponding spec subtraction).
Instances For
Per-entry bound tensor for multiplication.
This is the elementwise lifting of the scalar bound approx_mul_nf, tracking first-order error
propagation plus one rounding term.
Instances For
Per-entry bound tensor for scaling by a runtime constant.
scale_bound_tensor eps c xR bounds the error of xR * c assuming the input is approximated within
eps and treating c as exact (relative to its own toSpec value).
Instances For
Per-entry budget for scaling when the scalar coefficient is itself approximate.
scaleBoundTensor is the zero-coefficient-error specialization. This general form is required by
constants such as 1 / sqrt(d) in attention, where constructing the runtime coefficient already
incurs rounding.
Instances For
Per-entry bound tensor for negation.
Instances For
Per-entry bound tensor for absolute value.
Instances For
Per-entry bound tensor for exponentiation (exp).
This matches approx_exp_nf: a mean-value-theorem bound on the real exp plus one rounding term.
Instances For
Per-entry square-root budget on a domain with exact lower bound η.
Instances For
Per-entry bound tensor for hyperbolic tangent (tanh).
Currently uses the coarse unconditional bound from approx_tanh_nf (boundedness of tanh).
Instances For
Per-entry bound tensor for safeLog.
safeLog_bound_tensor ε eps xR is the elementwise bound used by approxTensor_safeLog_spec,
combining a (1/ε) Lipschitz propagation term with one rounding-ULP term.
Instances For
approxTensor bound for clamped log (safeLog) lifted to arbitrary tensor shapes.
This is the tensor-level wrapper around approx_safeLog_nf, using
approxTensor_map_spec_of_scalar_bound.