avr-fw-modules/core/include/fixpoint/ieee.h

19 lines
224 B
C
Raw Normal View History

2017-09-27 13:25:39 +02:00
#pragma once
#include <stdint.h>
union ieeefloat
{
float f;
struct {
uint32_t mantisse:23;
uint32_t exponent:8;
uint32_t sign:1;
};
};
typedef union ieeefloat IEEEFLOAT;
#define IEEEFLOAT(p) ((IEEEFLOAT*)p)