kfrlib / kfr

Fast, modern C++ DSP framework, FFT, Sample Rate Conversion, FIR/IIR/Biquad Filters (SSE, AVX, AVX-512, ARM NEON)
https://www.kfrlib.com
GNU General Public License v2.0
1.65k stars 253 forks source link

NaN caught when computing momentary loudness over negative zeros #100

Closed kakyoism closed 1 year ago

kakyoism commented 4 years ago

I got a problem where if the buffer fed to ebu128's packet contains all negative zeros, the momentary loudness will be nan.

Is this by design? Does kfr accept negative zeros as input data at all?

samuelriddle commented 4 years ago

Could you give more details about your compiler and target cpu architecture/compiler flags?

kakyoism commented 4 years ago

Target platform: iOS (arm64) Xcode 11.6 Compiler: Apple clang version 11.0.3 (clang-1103.0.32.62)

CMake command

cmake -GXcode \
        -DENABLE_TESTS=ON \
        -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_TOOLCHAIN_FILE="$ProjDir"/cmake/ios.cmake \
        -DIOS_PLATFORM=OS64 \
       "$ProjDir"

Then

    xcodebuild -project kfr.xcodeproj \
        -scheme kfr_dft \
        -configuration Release \
        -destination "platform=iOS,name=$DEVICE" \
        build

No custom compiler tweaks were done to the generated Xcode project.

dancazarin commented 1 year ago

Closed due to inactivity. Feel free to reopen if the problem still exists.