jgaeddert / liquid-dsp

digital signal processing library for software-defined radios
http://liquidsdr.org
MIT License
1.87k stars 439 forks source link

maximum float value? #254

Closed dj0abr closed 3 years ago

dj0abr commented 3 years ago

just a question:

is there any limitation on the maximum value for the DSP routines? i.e.: should the float values be within -1 .. +1, or can it be any value. Is there any risk of "clipping" if values like -10 .. +10 are used ?

Thanks Kurt

jgaeddert commented 3 years ago

In general, the answer is no.

Most of liquid uses single-precision floating-point math which doesn't have practical limitations for values. That being said, float values do have limits, and putting excessively large values in might reduce precision (e.g. trying to add 1e6f to 1e-6f will probably result in just 1e6f). This isn't an issue for most applications, though.

There is also a branch to run in fixed-point math. This certainly does have practical limitations with clipping. This branch isn't up to date, though.

dj0abr commented 3 years ago

thank you