test_fixed_point_normal_cdf

The normal CDF datapath, swept over EVERY representable input.

This is the one transcendental whose useful domain is small enough that the correctness claim is a proof rather than a sample: 573,441 inputs, all of them checked here by default. exp is 1.45M (feasible but slower, so strided by default) and ln is 2.1 billion (never exhaustive in the suite).

Attributes

CDF_EXACT

CDF_MEASURED_ULP

Functions

_sweep(point) → tuple[int, int, int]

(worst ULP, wrong, checked) over the whole domain. Double decides the

test_the_registered_point_is_correctly_rounded_over_every_input() → None

test_the_tile_is_total_and_saturates_exactly() → None

No error path: every int32 input has an answer, and the saturation IS

test_symmetry_holds_exactly() → None

The datapath folds on it, so a break here is a wrong answer for every

test_a_cheaper_point_is_not_correctly_rounded(...) → None

Pins WHY the registered point costs what it does: the obvious cheaper

Module Contents

test_fixed_point_normal_cdf.CDF_EXACT
test_fixed_point_normal_cdf.CDF_MEASURED_ULP = 0
test_fixed_point_normal_cdf._sweep(point: dau_core.fixed_point.NormalCdfDatapath) → tuple[int, int, int]

(worst ULP, wrong, checked) over the whole domain. Double decides the ordinary inputs; anything too close to a rounding boundary for it is re-decided against the 80-digit reference.

test_fixed_point_normal_cdf.test_the_registered_point_is_correctly_rounded_over_every_input() → None
test_fixed_point_normal_cdf.test_the_tile_is_total_and_saturates_exactly() → None

No error path: every int32 input has an answer, and the saturation IS the correctly rounded value rather than a clamp.

test_fixed_point_normal_cdf.test_symmetry_holds_exactly() → None

The datapath folds on it, so a break here is a wrong answer for every negative input at once.

test_fixed_point_normal_cdf.test_a_cheaper_point_is_not_correctly_rounded(table_bits: int, degree: int) → None

Pins WHY the registered point costs what it does: the obvious cheaper configuration misses, so the extra segments are load-bearing rather than conservative.