uxarray.utils.computing.accucross_pair

Contents

uxarray.utils.computing.accucross_pair#

uxarray.utils.computing.accucross_pair(ax_hi, ay_hi, az_hi, ax_lo, ay_lo, az_lo, bx_hi, by_hi, bz_hi, bx_lo, by_lo, bz_lo)#

Compensated cross product of two compensated vectors.

Computes (a_hi + a_lo) × (b_hi + b_lo) using a compensated 8-term dot product for each component, matching the two-argument accucross overload in the AccuSphGeom C++ library. This is more accurate than collapsing (hi, lo) to a single float before the cross product.

Parameters:
  • ax_hi (float) – High parts of vector a.

  • ay_hi (float) – High parts of vector a.

  • az_hi (float) – High parts of vector a.

  • ax_lo (float) – Low parts of vector a (rounding residuals from a prior compensated operation).

  • ay_lo (float) – Low parts of vector a (rounding residuals from a prior compensated operation).

  • az_lo (float) – Low parts of vector a (rounding residuals from a prior compensated operation).

  • bx_hi (float) – High parts of vector b.

  • by_hi (float) – High parts of vector b.

  • bz_hi (float) – High parts of vector b.

  • bx_lo (float) – Low parts of vector b.

  • by_lo (float) – Low parts of vector b.

  • bz_lo (float) – Low parts of vector b.

Returns:

x_hi, y_hi, z_hi, x_lo, y_lo, z_lo – Compensated cross-product components.

Return type:

float

References

Chen, H., Ullrich, P. A., Panetta, J., Marsico, D., Hanke, M., Jain, R., Zhang, C., and Jacob, R. L. (2026). Accurate and robust geometric algorithms for regridding on the sphere. Geoscientific Model Development, 19(14), 6545-6570. https://doi.org/10.5194/gmd-19-6545-2026