2 Purpose: Check return value double, with many arguments
5 Originator: From the original ffitest.c */
14 static double many(double f1
,
29 printf("%f %f %f %f %f %f %f %f %f %f %f %f %f\n",
30 (double) f1
, (double) f2
, (double) f3
, (double) f4
, (double) f5
,
31 (double) f6
, (double) f7
, (double) f8
, (double) f9
, (double) f10
,
32 (double) f11
, (double) f12
, (double) f13
);
35 return ((f1
/f2
+f3
/f4
+f5
/f6
+f7
/f8
+f9
/f10
+f11
/f12
) * f13
);
47 for (i
= 0; i
< 13; i
++)
49 args
[i
] = &ffi_type_double
;
54 /* Initialize the cif */
55 CHECK(ffi_prep_cif(&cif
, FFI_DEFAULT_ABI
, 13,
56 &ffi_type_double
, args
) == FFI_OK
);
58 ffi_call(&cif
, FFI_FN(many
), &f
, values
);
60 ff
= many(fa
[0], fa
[1],
65 fa
[10],fa
[11],fa
[12]);
66 if (fabs(f
- ff
) < FLT_EPSILON
)