2 Purpose: Check return value double.
5 Originator: From the original ffitest.c */
11 static double dblit(float f)
19 ffi_type *args[MAX_ARGS];
20 void *values[MAX_ARGS];
25 args[0] = &ffi_type_float;
28 /* Initialize the cif */
29 CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1,
30 &ffi_type_double, args) == FFI_OK);
34 ffi_call(&cif, FFI_FN(dblit), &d, values);
36 /* These are not always the same!! Check for a reasonable delta */
38 CHECK(d - dblit(f) < DBL_EPSILON);