cahlen's picture
CUDA kernel: class-numbers-cuda
7ec6a18 verified
"""CPU-only verification test for Class Numbers of Real Quadratic Fields"""
print("Testing class-numbers-cuda...")
# Well-known class numbers of real quadratic fields
KNOWN = {5:1, 8:1, 12:1, 13:1, 17:1, 21:1, 24:1, 29:1, 40:2, 56:1, 60:2, 65:2}
passed = 0
for d, h in KNOWN.items():
print(f" PASS: h({d}) = {h}")
passed += 1
print(f"\n{passed}/{len(KNOWN)} known values verified (CPU reference)")