You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ We created `numpycpp` to keep NumPy's familiar usage patterns while letting C++
15
15
16
16
`numpycpp` is a **header-only C++ library** implementing numpy's core API (`numpy.*`, `numpy.linalg.*`, `numpy.einsum`) with **bit-level precision alignment**. Raw pointer + size interface. Zero external dependencies — pure C++17 standard library.
17
17
18
-
All APIs are tested against Python numpy under strict bit-level comparison: every IEEE 754 float bit must match exactly (460 tests, float64 + float32).
18
+
All APIs are tested against Python numpy under strict bit-level comparison: every IEEE 754 float bit must match exactly (468 tests, float64 + float32).
19
19
20
20
**Bit-exact math** is achieved by resolving numpy's own math functions from `_multiarray_umath.so` at runtime. The SVML bridge auto-detects your CPU and selects the same path numpy uses: AVX‑512 SVML (`__svml_exp8`) when available, or scalar `npy_exp`/`npy_log`/etc. otherwise. AVX‑512 intrinsics are isolated behind `__attribute__((target))` — the binary is safe on any x86_64 CPU (no SIGILL). Every transcendental function produces the exact same IEEE 754 bits as numpy on **all architectures**.
21
21
@@ -89,12 +89,12 @@ Add `-Ipath/to/numpycpp` to your compiler flags and include the headers directly
89
89
### Testing
90
90
91
91
The test suite verifies **bit-level precision alignment** between every C++ function and Python numpy.
92
-
No tolerance, no `atol`/`rtol` — raw IEEE 754 bits must match exactly. 460 tests, float64 + float32.
92
+
No tolerance, no `atol`/`rtol` — raw IEEE 754 bits must match exactly. 468 tests, float64 + float32.
93
93
94
94
```bash
95
95
cd tests
96
96
make # compile C++ test module
97
-
make test# run all 460 tests (silent mode: only failures print)
97
+
make test# run all 468 tests (silent mode: only failures print)
98
98
```
99
99
100
100
To run with verbose output:
@@ -142,7 +142,7 @@ LDFLAGS = -shared -ldl
142
142
### Alignment status
143
143
144
144
The table below reflects the current bit-level parity between `numpycpp` C++ and Python numpy.
145
-
All 460 tests pass under strict IEEE 754 bit comparison (float64 + float32).
145
+
All 468 tests pass under strict IEEE 754 bit comparison (float64 + float32).
146
146
147
147
✅ = bit-exact on ALL architectures (SVML bridge with runtime CPU dispatch).
148
148
@@ -189,7 +189,7 @@ numpycpp/
189
189
│ └── einsum_py.h
190
190
├── tests/ # bit-level precision tests + test module
191
191
│ ├── module.cpp # pybind11 module for testing
192
-
│ ├── test_all.py # single entry — all APIs, 460 tests, float64+float32
192
+
│ ├── test_all.py # single entry — all APIs, 468 tests, float64+float32
0 commit comments