From b128daabb5283d3c7665905b4be1e754b57aa9a6 Mon Sep 17 00:00:00 2001 From: x Date: Thu, 15 Mar 2018 12:19:35 +0100 Subject: [PATCH] BitUtil: c/c++ header --- bitutil.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bitutil.h b/bitutil.h index 5cf0bb5..282c1ff 100644 --- a/bitutil.h +++ b/bitutil.h @@ -302,6 +302,10 @@ void bitxdec16( uint16_t *p, unsigned n, uint16_t start); void bitxdec32( uint32_t *p, unsigned n, uint32_t start); void bitxdec64( uint64_t *p, unsigned n, uint64_t start); +//------- Lossy floating point conversion: pad the trailing mantissa bits with zeros according to the error e (ex. e=0.00001) +void padfloat32(float *in, size_t n, float *out, float e); +void padfloat64(double *in, size_t n, double *out, double e); + #ifdef __cplusplus } #endif