https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101794
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- The section of std::lerp in the standard does not define what value should be returned if t is nan. I have not tried to find out what other parts of the standard say but I think this might be just unspecified area of the standard ...