[FFmpeg-devel] [PATCH] lavu/libm: add erf hack
gajjanag at mit.edu
Sun Dec 20 07:40:20 CET 2015
On Sat, Dec 19, 2015 at 9:58 PM, James Almer <jamrial at gmail.com> wrote:
> On 12/19/2015 11:34 PM, Ganesh Ajjanagadde wrote:
>> + /* handle the nan case, but don't use isnan for max portability */
>> + else if (z != z)
>> + return z;
> Didn't check, but this sounds like it would probably trigger warnings with
> -Wtautological-compare (GCC 6).
> That aside, libm.h has an isnan() fallback for systems where it's not
> available. Portability shouldn't be a problem.
Yes, but then this will need to be placed below breaking the
alphabetical order for minimal gain and I can't be as confident that
if (z != z) is perfectly valid C code that does its job. It is a
reasonably common idiom for nan checks. I believe (have not confirmed)
that even some libm's use it in some places.
Lastly, I have tested with clang 3.7.0-6 (on Arch) with -Weverything.
Only warning is for z == 0 test (Wfloat-equal).
Anyway, this I am not as reluctant to change as compared to the
licensing/copyright (wrt this patch).
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
More information about the ffmpeg-devel