From d5f6ddff9b65982230dfc7c0657c4b4cd3a43197 Mon Sep 17 00:00:00 2001 From: x Date: Thu, 23 Mar 2023 11:29:38 +0100 Subject: [PATCH] Lossy Floating point:Granular bitround algo --- lib/ext/gb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ext/gb.c b/lib/ext/gb.c index 68647a0..7248069 100644 --- a/lib/ext/gb.c +++ b/lib/ext/gb.c @@ -48,7 +48,7 @@ void ccr_gbr /* [fnc] Granular BitRound buffer of float values */ double mnt_log10_fabs; /* [frc] log10(fabs(mantissa))) */ double val; /* [frc] Copy of input value to avoid indirection */ - double prc_bnr_xct; /* [nbr] Binary digits of precision, exact */ + double prc_bnr_xct=0.0; /* [nbr] Binary digits of precision, exact */ double mss_val_cmp_dbl; /* Missing value for comparison to double precision values */ float mss_val_cmp_flt; /* Missing value for comparison to single precision values */ @@ -70,8 +70,8 @@ void ccr_gbr /* [fnc] Granular BitRound buffer of float values */ unsigned long long int msk_f64_u64_zro; unsigned long long int msk_f64_u64_one; unsigned long long int msk_f64_u64_hshv; - unsigned short prc_bnr_ceil; /* [nbr] Exact binary digits of precision rounded-up */ - unsigned short prc_bnr_xpl_rqr; /* [nbr] Explicitly represented binary digits required to retain */ + unsigned short prc_bnr_ceil=0; /* [nbr] Exact binary digits of precision rounded-up */ + unsigned short prc_bnr_xpl_rqr=0; /* [nbr] Explicitly represented binary digits required to retain */ /* Disallow unreasonable quantization */ //assert(nsd > 0);