Finite precision and cross-platform reproducibility

Note that, due to finite precision of floating-point arithmetics and differences between numerical libraries, the result of HEALPix functions like ang2pix (which converts the angular coordinates of a point into the index of the pixel to which it belongs) may depend on the underlying hardware, compilers, compiler options and linked libraries, if the requested position is very close to (roughly $10^{-15}$ radians or less) a pixel border. The result will always be one of the (two to four) adjacent pixels, and we are confident that it is strictly reproducible within the same binary on the same hardware platform, but if one of the components is changed, the result may change as well. This may be surprising when testing apparently "simple" locations like the poles.
This issue is not specific to HEALPix, but shared by any library performing nontrivial floating-point operations, and in particular any pixelisation library or facility (on any manifold, at any number of dimensions and for any practical pixelisation scheme), in the vicinity of pixel boundaries.

Version 3.82, 2022-07-28