Log
Matthias Kretz
[please enable javascript to see the address]
Tue May 28 11:30:26 CEST 2013
Hi Igor,
On Tuesday 28 May 2013 09:09:09 Kulakov, Igor wrote:
> It looks ok in release mode, but in debug I get:
>
> Assertion failed: ((*this >= 0.f).isFull()), function exponent, file
> /usr/local/include/Vc/sse/vector.tcc, line 1337.
>
> It appears when log(-1) is taken.
Yes, that's a bug.
> Do you have an idea what can be the problem? log(-1) == NAN isn't it?
> Do I use log incorectly?
Yes, log(-1) should give you NAN in release mode, no? The issue is that the
implementation of log uses another function in Vc (Vector::exponent()) which
does not handle negative numbers.
This probably needs a refactoring: move everything but the assertion of
exponent() into a new function that gets called by log and exponent...
If you don't want to do a complete fix, then just delete the assertion.
Cheers,
Matthias
--
Dipl.-Phys. Matthias Kretz
Phone: +49 69 798 44110
Web: http://compeng.uni-frankfurt.de/?mkretz
SIMD easy and portable: http://compeng.uni-frankfurt.de/?vc
More information about the Vc-devel
mailing list