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

Go to the source code of this file.

Functions

float64_t softfloat_normRoundPackToF64 (bool sign, int_fast16_t exp, uint_fast64_t sig)
 

Function Documentation

◆ softfloat_normRoundPackToF64()

float64_t softfloat_normRoundPackToF64 ( bool sign,
int_fast16_t exp,
uint_fast64_t sig )

Definition at line 43 of file s_normRoundPackToF64.c.

44{
45 int_fast8_t shiftDist;
46 union ui64_f64 uZ;
47
48 shiftDist = softfloat_countLeadingZeros64( sig ) - 1;
49 exp -= shiftDist;
50 if ( (10 <= shiftDist) && ((unsigned int) exp < 0x7FD) ) {
51 uZ.ui = packToF64UI( sign, sig ? exp : 0, sig<<(shiftDist - 10) );
52 return uZ.f;
53 } else {
54 return softfloat_roundPackToF64( sign, exp, sig<<shiftDist );
55 }
56
57}
float64_t softfloat_roundPackToF64(bool, int_fast16_t, uint_fast64_t)
#define packToF64UI(sign, exp, sig)
Definition internals.h:128
#define softfloat_countLeadingZeros64
int8_t int_fast8_t
Definition stdint.h:150