[FFmpeg-devel] [PATCH v1] Bug #8027 - Wrong result for FFSIGN(0)

Ulf Zibis Ulf.Zibis at CoSoCo.de
Wed Jul 17 23:33:49 EEST 2019


Am 17.07.19 um 19:21 schrieb Nicolas George:
> Ulf Zibis (12019-07-17):
>> Because anyone I ask including mathematicians, is the opinion that the
>> sign of 0 is positive.
> They were not very competent mathematicians.
In normal arithmetic, yes, sgn(0) is 0, but here we are in floating
point arithmetics where sgn(0) is 1, see:
https://en.wikipedia.org/wiki/Floating-point_arithmetic#Signed_zero

But FFSIGN(0) results as -1, which is never correct.

-Ulf



More information about the ffmpeg-devel mailing list