Opened 3 years ago

Closed 3 years ago

#8027 closed defect (wontfix)

Wrong result for FFSIGN(0)

Reported by: Ulf Zibis Owned by:
Priority: normal Component: avutil
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


Summary of the bug:
The sign of zero should be +1, not -1
How to reproduce:

    av_log(NULL, AV_LOG_ERROR, "FFSIGN(0): %d\n", FFSIGN(0));
    av_log(NULL, AV_LOG_ERROR, "FFSIGN(0.0D): %d\n", FFSIGN(0.0D));
    av_log(NULL, AV_LOG_ERROR, "FFSIGN(-0.0D): %d\n", FFSIGN(-0.0D));


FFSIGN(0): -1
FFSIGN(0.0D): -1
FFSIGN(-0.0D): -1

Change History (1)

comment:1 by Hendrik, 3 years ago

Resolution: wontfix
Status: newclosed

The function should behave how it was written to behave. It is not documented to behave in any certain way at any given value. Changing it would certainly lead to bugs somewhere.

Note: See TracTickets for help on using tickets.