#include <stdbool.h>
#include <stdint.h>
#include "platform.h"
#include "internals.h"
#include "specialize.h"
#include "softfloat.h"
Go to the source code of this file.
◆ f32_to_f16()
Definition at line 44 of file f32_to_f16.c.
45{
48 bool sign;
54
55
56
58 uiA = uA.ui;
62
63
64 if ( exp == 0xFF ) {
65 if ( frac ) {
68 } else {
70 }
71 goto uiZ;
72 }
73
74
75 frac16 = frac>>9 | ((frac & 0x1FF) != 0);
76 if ( ! (exp | frac16) ) {
78 goto uiZ;
79 }
80
81
83 uiZ:
84 uZ.ui = uiZ;
85 return uZ.f;
86
87}
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
#define softfloat_commonNaNToF16UI(aPtr)
#define softfloat_f32UIToCommonNaN(uiA, zPtr)
float16_t softfloat_roundPackToF16(bool, int_fast16_t, uint_fast16_t)
#define packToF16UI(sign, exp, sig)