I've constructed what I believe to be the simplest possible use of the extFloat80_t type provided by the SoftFloat library (http://www.jhauser.us/arithmetic/SoftFloat.html) and can't see what I'm doing wrong -- all values for i32 that I've tried result in output "0".
#include "softfloat.h"
#include "stdio.h"
int main( int argc, char** argv )
{
int32_t i32 = 1000;
extFloat80_t f80 = i32_to_extF80(i32);
int32_t i80 = extF80_to_i32_r_minMag( f80, false );
printf( "%d\n", i80 );
return 0;
}
Built via
gcc -I source/include/ test.c -DSOFTFLOAT_FAST_INT64 build/Linux-x86_64-GCC/softfloat.a -DSOFTFLOAT_ROUND_ODD -DINLINE_LEVEL=5 -DSOFTFLOAT_FAST_DIV32TO16 -DSOFTFLOAT_FAST_DIV64TO32