From 69619dd31e91263c10c768465e25b1d820765ba5 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Tue, 20 Apr 2021 15:35:56 -0400 Subject: [PATCH] Remove an unused variable. Protect against extreme values leading to FPEs. --- lib/qra/q65/q65.c | 21 +++++++++++++-------- map65/libm65/display.f90 | 1 - 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/lib/qra/q65/q65.c b/lib/qra/q65/q65.c index f7701792f..10d756d8a 100644 --- a/lib/qra/q65/q65.c +++ b/lib/qra/q65/q65.c @@ -434,11 +434,14 @@ int q65_intrinsics_fastfading(q65_codec_ds *pCodec, // exponentiate and accumulate the normalization constant sumix = 0.0f; - for (k=0;k 85.0) x= 85.0; + fTemp = expf(x); + pCurIx[k]=fTemp; + sumix +=fTemp; + } // scale to a probability distribution sumix = 1.0f/sumix; @@ -663,9 +666,11 @@ int q65_check_llh(float *llh, const int* ydec, const int nN, const int nM, const float t = 0; for (k=0;k