This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdint.h> | |
#include <assert.h> | |
#define DATA_SIZE 2052 | |
float decode(uint16_t float16_value) | |
{ | |
// MSB -> LSB | |
// float16=1bit: sign, 5bit: exponent, 10bit: fraction |