Re: std::isinf(-inf) strange results

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux