On Sun, Nov 23, 2025 at 11:51 AM Ralf Gommers <[email protected]> wrote:
> > > On Sun, Nov 23, 2025 at 8:47 AM Matti Picus via NumPy-Discussion < > [email protected]> wrote: > >> >> > The question I have is whether we should expose all the functionality > that's currently exposed in `halffloat.h` or leave out some of the odd > ones. The conversion and comparison functions seem most useful, but for > example the `*_nonan` variants look weird (we don't normally expose > "skip-nan" flavors just for some performance), as does `_iszero` (unlike > `_isnan` et al. it doesn't have a C99 equivalent). > Now that the header-only version in https://github.com/numpy/numpy/pull/30380 is close to merge-ready, I'd like to circle back to this point - what will we expose as the new public API? A 1:1 replacement for everything is ready, but if we expose it all under the new `npy_float16_*` names then we'll be stuck with it in the future. We can also decide to just expose the conversion and comparison routines, plus the macros, but leave out the `*_nonan` routines, `_iszero`, and possibly also the low-level bit conversion routines like `npy_floatbits_to_float16bits`. They could just be ifdef'd out and in case someone needs them, it'll be quite easy to expose them in a next release. Thoughts? Cheers, Ralf
_______________________________________________ NumPy-Discussion mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/numpy-discussion.python.org Member address: [email protected]
