On 13 February 2017 at 16:29, Segher Boessenkool <segher@xxxxxxxxxxxxxxxxxxx> wrote: > On Mon, Feb 13, 2017 at 05:08:07PM +0100, Andrew - wrote: >> Is this the expected behaviour when std::isinf(-inf) yields 0 or -1 >> instead of 1? > > It returns a bool, not a number. Unless the C library defines int isinf(double) in which case it returns a number. And in that case we can't do much about it, so std::isinf(double) also returns int. But this is already fixed in current releases of GCC and glibc.