#include <stdio.h>
float f1(float a, float b)
{
printf("a = %f, b = %f/n", a, b);
printf("a+b = %f/n", a+b);
return (a+b);
}
float f2(double a)
{
printf("a = %f/n", a);
return (float)a;
}
typedef float (*FUNC)();
int main()
{
int params[2] = {1066192077, 1066192077};
FUNC func1 = NULL;
float ret = 0;
func1 = (FUNC)f1;
ret = func1(params[0], params[1]);
printf("ret = %d/n", (int)ret);
func1 = (FUNC)f2;
params[0] = -858993459;
params[1] = 1073794252;
ret = func1(params[0], params[1]);
printf("ret = %f/n", ret);
return 0;
}