Skip to content

Commit

Permalink
refactor!: Chi: Use u64 for freedom
Browse files Browse the repository at this point in the history
Degrees of freedom `k` is usually defined as a positive
integer. Storing `k` as a NonZeroU64 avoids all degenerate cases
from the start (k < 0, k == 0, k == NaN), and the overhead of
casting to an f64 for some operations should be minimal.

NonZeroU64 also allows memory layout optimizations (similar to
the nullptr optimization).
  • Loading branch information
FreezyLemon authored and YeungOnion committed Nov 5, 2024
1 parent ce3ebf6 commit 252d3d7
Showing 1 changed file with 128 additions and 210 deletions.
Loading

0 comments on commit 252d3d7

Please sign in to comment.