https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64370
Mikhail Maltsev <maltsevm at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |maltsevm at gmail dot com --- Comment #3 from Mikhail Maltsev <maltsevm at gmail dot com> --- In libgfortran/intrinsics/c99_functions.c, scalbn is implemented like this: double scalbn (double x, int y) { #if (FLT_RADIX == 2) && defined(HAVE_LDEXP) return ldexp (x, y); #else return x * pow (FLT_RADIX, y); #endif } Maybe something similar could be used here. If pow is not OK, something like this could be used: return (y >= 0) ? x * (1 << y) : x / (1 << (-y)); (assuming that shift will not cause overflow). BTW, what if FLT_RADIX != 2?