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

Function floatx80_round32

src/softfloat/softfloat.cpp:2044–2062  ·  view source on GitHub ↗

30-01-2016: Added for Previous

Source from the content-addressed store, hash-verified

2042
2043#ifdef SOFTFLOAT_68K // 30-01-2016: Added for Previous
2044floatx80 floatx80_round32( floatx80 a, float_status *status )
2045{
2046 flag aSign;
2047 int32_t aExp;
2048 uint64_t aSig;
2049
2050 aSig = extractFloatx80Frac( a );
2051 aExp = extractFloatx80Exp( a );
2052 aSign = extractFloatx80Sign( a );
2053
2054 if ( aExp == 0x7FFF || aSig == 0 ) {
2055 return a;
2056 }
2057 if ( aExp == 0 ) {
2058 normalizeFloatx80Subnormal( aSig, &aExp, &aSig );
2059 }
2060
2061 return roundSigAndPackFloatx80( 32, aSign, aExp, aSig, 0, status );
2062}
2063
2064floatx80 floatx80_round64( floatx80 a, float_status *status )
2065{

Callers 1

fp_round32Function · 0.85

Calls 5

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

Tested by

no test coverage detected