Skip to content

Fix MET overflow in gFEX

Cecilia Tosciri requested to merge ctosciri/athena:gfex_altMET_bug into main

This MR resolves the occasional FPEs reported in ATR-28045. In the calculation of MET, both in the JwoJ algorithm and the alternative algorithm, the number of available bits for MET_x, MET_y and MET is now taken into account to prevent an overflow that was causing wrapping to negative numbers. These numbers were passed to std::sqrt causing the FPE.

Merge request reports