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

Go to the source code of this file.

Functions

float64_t i64_to_f64 (int64_t a)
 

Function Documentation

◆ i64_to_f64()

float64_t i64_to_f64 ( int64_t a)

Definition at line 43 of file i64_to_f64.c.

44{
45 bool sign;
46 union ui64_f64 uZ;
47 uint_fast64_t absA;
48
49 sign = (a < 0);
50 if ( ! (a & UINT64_C( 0x7FFFFFFFFFFFFFFF )) ) {
51 uZ.ui = sign ? packToF64UI( 1, 0x43E, 0 ) : 0;
52 return uZ.f;
53 }
54 absA = sign ? -(uint_fast64_t) a : (uint_fast64_t) a;
55 return softfloat_normRoundPackToF64( sign, 0x43C, absA );
56
57}
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition pointer.h:1181
float64_t softfloat_normRoundPackToF64(bool, int_fast16_t, uint_fast64_t)
#define packToF64UI(sign, exp, sig)
Definition internals.h:128
uint64_t uint_fast64_t
Definition stdint.h:157
#define UINT64_C(val)
Definition stdint.h:284
Here is the call graph for this function:
Here is the caller graph for this function: