[FFmpeg-user] Problem with signbit()

Ulf Zibis Ulf.Zibis at gmx.de
Thu Jul 18 02:41:02 EEST 2019


Von meinem Seibert gesendet

Hi,

$ gcc --version
gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0

Given this code snippet:
    float a = 0.0F;
    float b = -0.0F;
    printf("a: %f, signbit(a): %d\n", a, signbit(a));
    printf("b: %f, signbit(b): %d\n", b, signbit(b));
Result:
    a: 0.000000, signbit(a): 0
    b: -0.000000, signbit(b): 0
I would expect:
    a: 0.000000, signbit(a): 0
    b: -0.000000, signbit(b): <something not 0>
... according to: http://man7.org/linux/man-pages/man3/signbit.3.html

Are there some flags in the your build script which cause this problem?

If I compile the code without FFmpeg build script, but with standard
configuration, I get the expected result.

-Ulf




More information about the ffmpeg-user mailing list