https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87121
--- Comment #2 from Mihai Preda <mpreda at gmail dot com> --- OK my bad. I don't understand exactly why the <cmath> or the std:: pow() version is preferred, but this seems to be what's happening, and explains the behavior. Feel free to close this.