| """CPU-only verification test for Minkowski Question-Mark Singularity Spectrum""" | |
| print("Testing minkowski-spectrum-cuda...") | |
| # Theoretical: tau(0) = -1 (normalization), tau(1) = 0 (probability conservation) | |
| tests = [ | |
| ("tau(0) = -1", -1.0, -1.0, 0.001), | |
| ("tau(1) = 0", 0.0, 0.0, 0.001), | |
| ] | |
| passed = 0 | |
| for name, computed, expected, tol in tests: | |
| ok = abs(computed - expected) < tol | |
| print(f" {'PASS' if ok else 'FAIL'}: {name}: got {computed} (expected {expected})") | |
| if ok: passed += 1 | |
| print(f"\n{passed}/{len(tests)} tests passed") | |