Opened 10 years ago

Closed 9 years ago

#4464 closed defect (fixed)

fft-test.c should be using fabs() rather than fabsf() for double precision operations

Reported by: Jeremy Huddleston Owned by:
Priority: minor Component: avcodec
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

input and output are double precision accuracy. It looks like someone made a typo. The compiler warning says it all:

src/libavcodec/fft-test.c:200:20: warning: absolute value function 'fabsf' given an argument of type 'double' but has parameter of type 'float' which may cause truncation of value [-Wabsolute-value]
        double e = fabsf(tab1[i] - (tab2[i] / scale)) / RANGE;
                   ^
src/libavcodec/fft-test.c:200:20: note: use function 'fabs' instead
        double e = fabsf(tab1[i] - (tab2[i] / scale)) / RANGE;
                   ^~~~~
                   fabs
1 warning generated.

Change History (1)

comment:1 by Ganesh Ajjanagadde, 9 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.