Neal Becker wrote:
gcc-4.3.0-8.x86_64
I have test code that does passes std::isfinite (x), yet if I print the
values to std::cout the value printed is 'inf'. Is std::isfinite (x)
broken?
Whatever bug it may have - it can, of course - std::isfinite returns an
*int*, therefore your statement
Paolo Carlini wrote:
> Neal Becker wrote:
>> gcc-4.3.0-8.x86_64
>>
>> I have test code that does passes std::isfinite (x), yet if I print the
>> values to std::cout the value printed is 'inf'. Is std::isfinite (x)
>> broken?
>>
> Whatever bug it may have - it can, of course - std::isfinite ret
On Mon, Jul 28, 2008 at 1:52 PM, Neal Becker <[EMAIL PROTECTED]> wrote:
> Paolo Carlini wrote:
>
>> Neal Becker wrote:
>>> gcc-4.3.0-8.x86_64
>>>
>>> I have test code that does passes std::isfinite (x), yet if I print the
>>> values to std::cout the value printed is 'inf'. Is std::isfinite (x)
>>>
... ah, ok, now I see what you meant, you meant that x is *not* finite,
still, std::isfinite(x) != 0. Still, testcase badly needed...
Paolo.
Neal Becker wrote:
I found that compiling without -ffast-math would allow std::isfinite to
work. Sorry if the statement was confusing. The code looks something
like:
[calculate x]
if (not isfinite (x))
throw std::runtime_error ("blah")
Well, -ffast-math implies -ffinite-math-only, I think
Paolo Carlini wrote:
> ... ah, ok, now I see what you meant, you meant that x is *not* finite,
> still, std::isfinite(x) != 0. Still, testcase badly needed...
>
> Paolo.
#include
#include
int main () {
double x = log (0);
if (not std::isfinite (x)) {
throw std::runtime_error ("not fini
Hi Ho!
--- On Tue, 7/29/08, "Neal Becker" <[EMAIL PROTECTED]> wrote:
> Paolo Carlini wrote:
>
> > ... ah, ok, now I see what you meant, you meant that x is *not* finite,
> > still, std::isfinite(x) != 0. Still, testcase badly needed...
> >
> > Paolo.
> #include
> #include
>
> int main () {
>
Hi ho, ho!! ;)
It worked with me.
Try a recent gcc (eg, 4.3.x) and you will get the same, actually
expected, result of the original poster.
Paolo.
Paolo Carlini wrote:
> Hi ho, ho!! ;)
>> It worked with me.
>>
> Try a recent gcc (eg, 4.3.x) and you will get the same, actually
> expected, result of the original poster.
>
> Paolo.
I believe this is a bug. I agree that -ffast-math will not always comply 100%
with IEEE, as advertised. Bu
Neal Becker wrote on 31 July 2008 12:42:
> Paolo Carlini wrote:
>
>> Hi ho, ho!! ;)
>>> It worked with me.
>>>
>> Try a recent gcc (eg, 4.3.x) and you will get the same, actually
>> expected, result of the original poster.
>>
>> Paolo.
>
> I believe this is a bug. I agree that -ffast-math wil
Dave Korn wrote on 31 July 2008 12:45:
> Neal Becker wrote on 31 July 2008 12:42:
>> If it is really intended not to work, then at least
>> documentation should state that.
>
> It does, as was already explained to you; re-read the thread.
Actually I can be more use than that, I'll show you
11 matches
Mail list logo