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

Go to the source code of this file.

Functions

float32_t softfloat_normRoundPackToF32 (bool sign, int_fast16_t exp, uint_fast32_t sig)
 

Function Documentation

◆ softfloat_normRoundPackToF32()

float32_t softfloat_normRoundPackToF32 ( bool sign,
int_fast16_t exp,
uint_fast32_t sig )

Definition at line 43 of file s_normRoundPackToF32.c.

44{
45 int_fast8_t shiftDist;
46 union ui32_f32 uZ;
47
48 shiftDist = softfloat_countLeadingZeros32( sig ) - 1;
49 exp -= shiftDist;
50 if ( (7 <= shiftDist) && ((unsigned int) exp < 0xFD) ) {
51 uZ.ui = packToF32UI( sign, sig ? exp : 0, sig<<(shiftDist - 7) );
52 return uZ.f;
53 } else {
54 return softfloat_roundPackToF32( sign, exp, sig<<shiftDist );
55 }
56
57}
float32_t softfloat_roundPackToF32(bool, int_fast16_t, uint_fast32_t)
#define packToF32UI(sign, exp, sig)
Definition internals.h:107
#define softfloat_countLeadingZeros32
int8_t int_fast8_t
Definition stdint.h:150
Here is the call graph for this function:
Here is the caller graph for this function: