[FFmpeg-trac] #8027(avutil:new): Wrong result for FFSIGN(0)

FFmpeg trac at avcodec.org
Wed Jul 17 09:29:30 EEST 2019


#8027: Wrong result for FFSIGN(0)
----------------------------------+---------------------------------------
             Reporter:  UlfZibis  |                     Type:  defect
               Status:  new       |                 Priority:  normal
            Component:  avutil    |                  Version:  unspecified
             Keywords:            |               Blocked By:
             Blocking:            |  Reproduced by developer:  0
Analyzed by developer:  0         |
----------------------------------+---------------------------------------
 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));
 }}}
 Result:
 {{{
 FFSIGN(0): -1
 FFSIGN(0.0D): -1
 FFSIGN(-0.0D): -1
 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/8027>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list