Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
ui32_to_f64.c File Reference
#include <stdint.h>
#include "platform.h"
#include "internals.h"
#include "softfloat.h"
Include dependency graph for ui32_to_f64.c:

Go to the source code of this file.

Functions

float64_t ui32_to_f64 (uint32_t a)
 

Function Documentation

◆ ui32_to_f64()

float64_t ui32_to_f64 ( uint32_t a)

Definition at line 42 of file ui32_to_f64.c.

43{
44 uint_fast64_t uiZ;
45 int_fast8_t shiftDist;
46 union ui64_f64 uZ;
47
48 if ( ! a ) {
49 uiZ = 0;
50 } else {
51 shiftDist = softfloat_countLeadingZeros32( a ) + 21;
52 uiZ =
53 packToF64UI( 0, 0x432 - shiftDist, (uint_fast64_t) a<<shiftDist );
54 }
55 uZ.ui = uiZ;
56 return uZ.f;
57
58}
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition pointer.h:1181
#define packToF64UI(sign, exp, sig)
Definition internals.h:128
#define softfloat_countLeadingZeros32
uint64_t uint_fast64_t
Definition stdint.h:157
int8_t int_fast8_t
Definition stdint.h:150
uint64_t ui
Definition internals.h:47