diff options
author | eb | 2008-05-08 06:17:55 +0000 |
---|---|---|
committer | eb | 2008-05-08 06:17:55 +0000 |
commit | 593a87ce2254a7966d33fa88e2efa9cbbdb4f7f0 (patch) | |
tree | ef90d2e19a69908b0616975600bfcad30f5a50bb /gnuradio-core/src/lib/viterbi | |
parent | f29ed72859a46428e1ad1d97306554b19202a958 (diff) | |
download | gnuradio-593a87ce2254a7966d33fa88e2efa9cbbdb4f7f0.tar.gz gnuradio-593a87ce2254a7966d33fa88e2efa9cbbdb4f7f0.tar.bz2 gnuradio-593a87ce2254a7966d33fa88e2efa9cbbdb4f7f0.zip |
better fix for ticket:243
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@8324 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gnuradio-core/src/lib/viterbi')
-rw-r--r-- | gnuradio-core/src/lib/viterbi/metrics.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gnuradio-core/src/lib/viterbi/metrics.c b/gnuradio-core/src/lib/viterbi/metrics.c index 3351ff403..2dd4279aa 100644 --- a/gnuradio-core/src/lib/viterbi/metrics.c +++ b/gnuradio-core/src/lib/viterbi/metrics.c @@ -30,6 +30,10 @@ * */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + /* Symbols are offset-binary, with 128 corresponding to an erased (no * information) symbol */ @@ -41,6 +45,12 @@ /* Normal function integrated from -Inf to x. Range: 0-1 */ #define normal(x) (0.5 + 0.5*erf((x)/M_SQRT2)) +/* Logarithm base 2 */ +double log2(double); /* declaration seems to be missing from some math.h's */ +#if !defined(HAVE_LOG2) +#define log2(x) (log(x)*M_LOG2E) +#endif + /* Generate log-likelihood metrics for 8-bit soft quantized channel * assuming AWGN and BPSK */ |