diff --git a/tests/polar_list_regression_test.cc b/tests/polar_list_regression_test.cc index 2426058..025273f 100644 --- a/tests/polar_list_regression_test.cc +++ b/tests/polar_list_regression_test.cc @@ -39,11 +39,9 @@ int main() #if 1 const int L = 32; typedef int8_t code_type; - double SCALE = 2; #else const int L = 8; typedef float code_type; - double SCALE = 1; #endif typedef SIMD simd_type; @@ -159,7 +157,7 @@ int main() // $LLR=log(\frac{p(x=+1|y)}{p(x=-1|y)})$ // $p(x|\mu,\sigma)=\frac{1}{\sqrt{2\pi}\sigma}}e^{-\frac{(x-\mu)^2}{2\sigma^2}}$ double DIST = 2; // BPSK - double fact = SCALE * DIST / (sigma_noise * sigma_noise); + double fact = DIST / (sigma_noise * sigma_noise); for (int i = 0; i < N; ++i) codeword[i] = CODE::PolarHelper::quant(fact * symb[i]); diff --git a/tests/polar_regression_test.cc b/tests/polar_regression_test.cc index 1f21224..039bee8 100644 --- a/tests/polar_regression_test.cc +++ b/tests/polar_regression_test.cc @@ -30,10 +30,8 @@ int main() const bool systematic = true; #if 1 typedef int8_t code_type; - double SCALE = 2; #else typedef float code_type; - double SCALE = 1; #endif std::random_device rd; @@ -124,7 +122,7 @@ int main() // $LLR=log(\frac{p(x=+1|y)}{p(x=-1|y)})$ // $p(x|\mu,\sigma)=\frac{1}{\sqrt{2\pi}\sigma}}e^{-\frac{(x-\mu)^2}{2\sigma^2}}$ double DIST = 2; // BPSK - double fact = SCALE * DIST / (sigma_noise * sigma_noise); + double fact = DIST / (sigma_noise * sigma_noise); for (int i = 0; i < N; ++i) codeword[i] = CODE::PolarHelper::quant(fact * symb[i]);