Instructions to use cahlen/class-numbers-cuda with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use cahlen/class-numbers-cuda with Kernels:
# !pip install kernels from kernels import get_kernel kernel = get_kernel("cahlen/class-numbers-cuda") - Notebooks
- Google Colab
- Kaggle
File size: 409 Bytes
7ec6a18 | 1 2 3 4 5 6 7 8 9 10 11 12 | """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)")
|