From afc08c3d0d92a79587f994774393545f4611c1df Mon Sep 17 00:00:00 2001 From: david-on-debian Date: Tue, 20 May 2025 20:41:35 -0500 Subject: [PATCH] Upload files to "include/math" --- include/math/software_float.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 include/math/software_float.h diff --git a/include/math/software_float.h b/include/math/software_float.h new file mode 100644 index 0000000..8e75531 --- /dev/null +++ b/include/math/software_float.h @@ -0,0 +1,18 @@ +#ifndef _SOFTWARE_FLOAT_H +#define _SOFTWARE_FLOAT_H + +#include + +typedef struct { + uint8_t sign; /* 0 = positive, 1 = negative */ + uint8_t exponent; /* 8-bit biased exponent (bias = 127) */ + uint32_t mantissa; /* 23 bits stored (MSB implicit for normalized numbers) */ +} soft_float32_t; + +typedef struct { + uint8_t sign; /* 0 = positive, 1 = negative */ + uint16_t exponent; /* 11-bit biased exponent (bias = 1023) */ + uint64_t mantissa; /* 52 bits stored (MSB implicit for normalized numbers) */ +} soft_float64_t; + +#endif