A update
This commit is contained in:
18
include/math/software_float.h
Normal file
18
include/math/software_float.h
Normal file
@ -0,0 +1,18 @@
|
||||
#ifndef _SOFTWARE_FLOAT_H
|
||||
#define _SOFTWARE_FLOAT_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
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
|
Reference in New Issue
Block a user