On Sat, Dec 19, 2015 at 10:40 PM, Ganesh Ajjanagadde wrote:
> On Sat, Dec 19, 2015 at 9:58 PM, James Almer 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;
>>
>>
On Sat, Dec 19, 2015 at 9:58 PM, James Almer 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 warning
On Sat, Dec 19, 2015 at 7:06 PM, James Almer wrote:
> On 12/19/2015 11:34 PM, Ganesh Ajjanagadde wrote:
>> +/**
>> + * erf function
>> + * Algorithm taken from the Boost project, source:
>> + * http://www.boost.org/doc/libs/1_46_1/boost/math/special_functions/erf.hpp
>> + * Use, modification and d
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
On 12/19/2015 11:34 PM, Ganesh Ajjanagadde wrote:
> +/**
> + * erf function
> + * Algorithm taken from the Boost project, source:
> + * http://www.boost.org/doc/libs/1_46_1/boost/math/special_functions/erf.hpp
> + * Use, modification and distribution are subject to the
> + * Boost Software License,
Source code is from Boost:
http://www.boost.org/doc/libs/1_46_1/boost/math/special_functions/erf.hpp
with appropriate modifications for FFmpeg.
Tested on interval -6 to 6 (beyond which it saturates), +/-NAN, +/-INFINITY
under -fsanitize=undefined on clang to test for possible undefined behavior.