Commit Graph

1 Commits

Author SHA1 Message Date
230f803abb ocaml: phase 5.1 count_bits.ml baseline (sum popcount 0..100 = 319)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 23s
DP recurrence for popcount that avoids host bitwise operations:

  result[i] = result[i / 2] + (i mod 2)

Drops the low bit (i / 2 stands in for i lsr 1) and adds it back
if it was 1 (i mod 2 stands in for i land 1).

  sum over 0..100 of popcount(i) = 319

Tests pure-arithmetic popcount, accumulating ref + DP array,
classic look-back to half-index pattern.

197 baseline programs total.
2026-05-11 04:54:36 +00:00