I also got the same issue on my Windows machine with the ucrt64 gcc compiler. As Christian mentioned below, you can workaround by specifying using "std::fabs" instead or by casting the unsigned values (e.g., static_cast(k1), etc.). Not sure if there is a more elegant solution than this