public static float float4 ( int a , int b , int c , int d ) { int sgn , mant , exp ; mant = b << 16 | c << 8 | d ; if ( mant == 0 ) { return 0.0f ; } sgn = - ( ( ( a & 128 ) >> 6 ) - 1 ) ; exp = ( a & 127 ) - 64 ; return ( float ) ( sgn * Math . pow ( 16.0 , exp - 6 ) * mant ) ; }
Convert 4 bytes to a float .