9 if ( memcmp( &_expected[0], &result[0], 4 ) == 0 ) {
12 printf(
"\n%f -> %2.2x%2.2x%2.2x%2.2x ... BAD\n", _value, (
unsigned char) _expected[0], (
unsigned char) _expected[1], (
unsigned char) _expected[2], (
unsigned char) _expected[3] );
13 printf(
" got : %2.2x %2.2x %2.2x %2.2x\n", (
unsigned char) result[0], (
unsigned char) result[1], (
unsigned char) result[2], (
unsigned char) result[3] );
24 if ( ( result - _expected ) < 0.01 ) {
27 printf(
"\n%2.2x%2.2x%2.2x%2.2x -> %f ... BAD\n", (
unsigned char) _value[0], (
unsigned char) _value[1], (
unsigned char) _value[2], (
unsigned char) _value[3], _expected );
28 printf(
" got : %f\n", result );
void cpu_float_single_from_double_to_int_array(Environment *_environment, double _value, int _result[])
void cpu_float_single_from_int_array_to_double(Environment *_environment, int _value[], double *_result)
void test_fp_conversion_to_double(Environment *_environment, int _value[4], double _expected)
void test_fp_conversion_to_bytes(Environment *_environment, double _value, int _expected[4])
struct _Environment Environment
Structure of compilation environment.