#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.
◆ f16_to_f128()
Definition at line 44 of file f16_to_f128.c.
45{
48 bool sign;
52 struct uint128 uiZ;
54 union ui128_f128 uZ;
55
56
57
59 uiA = uA.ui;
63
64
65 if ( exp == 0x1F ) {
66 if ( frac ) {
69 } else {
70 uiZ.v64 = packToF128UI64( sign, 0x7FFF, 0 );
71 uiZ.v0 = 0;
72 }
73 goto uiZ;
74 }
75
76
77 if ( ! exp ) {
78 if ( ! frac ) {
79 uiZ.v64 = packToF128UI64( sign, 0, 0 );
80 uiZ.v0 = 0;
81 goto uiZ;
82 }
84 exp = normExpSig.exp - 1;
85 frac = normExpSig.sig;
86 }
87
88
89 uiZ.v64 = packToF128UI64( sign, exp + 0x3FF0, (
uint_fast64_t) frac<<38 );
90 uiZ.v0 = 0;
91 uiZ:
92 uZ.ui = uiZ;
93 return uZ.f;
94
95}
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
#define softfloat_commonNaNToF128UI
#define softfloat_f16UIToCommonNaN(uiA, zPtr)
struct exp8_sig16 softfloat_normSubnormalF16Sig(uint_fast16_t)