MCPcopy Create free account
hub / github.com/BlitterStudio/amiberry / floatx80_round64

Function floatx80_round64

src/softfloat/softfloat.cpp:2064–2082  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2062}
2063
2064floatx80 floatx80_round64( floatx80 a, float_status *status )
2065{
2066 flag aSign;
2067 int32_t aExp;
2068 uint64_t aSig;
2069
2070 aSig = extractFloatx80Frac( a );
2071 aExp = extractFloatx80Exp( a );
2072 aSign = extractFloatx80Sign( a );
2073
2074 if ( aExp == 0x7FFF || aSig == 0 ) {
2075 return a;
2076 }
2077 if ( aExp == 0 ) {
2078 normalizeFloatx80Subnormal( aSig, &aExp, &aSig );
2079 }
2080
2081 return roundSigAndPackFloatx80( 64, aSign, aExp, aSig, 0, status );
2082}
2083
2084floatx80 floatx80_round_to_float32( floatx80 a, float_status *status )
2085{

Callers 1

fp_round64Function · 0.85

Calls 5

extractFloatx80FracFunction · 0.85
extractFloatx80ExpFunction · 0.85
extractFloatx80SignFunction · 0.85
roundSigAndPackFloatx80Function · 0.85

Tested by

no test coverage detected