sqrt error
Posted: Mon Feb 06, 2017 2:26 pm
I need the square root of a real ST_Dev. Flowcode made the C-file:
// Calculate the standard deviation
// Calculation:
// St_Dev = sqrt (St_Dev)
// St_Dev = St_Dev / (Nmax - 1)
// Temp = float2int (St_Dev + 0.5) // rounded
FCV_ST_DEV = float32_sqrt(FCV_ST_DEV);
FCV_ST_DEV = flt_div(FCV_ST_DEV, flt_fromi((FCV_NMAX - 1)));
FCV_TEMP = flt_toi(flt_add(FCV_ST_DEV, 0.5));
But I get the error message:
UVmeter_V9.c: main()
1656: FCV_ST_DEV = float32_sqrt(FCV_ST_DEV);
^ (361) function declared implicit int (warning)
UVmeter_V9.c: 1656: (1464) number of arguments passed to function "_float32_sqrt" does not match function's prototype (warning)
UVmeter_V9.c: 1679: (1464) number of arguments passed to function "_float32_sqrt" does not match function's prototype (warning)
0: (499) undefined symbol:
_float32_sqrt(UVmeter_V9.obj)
.
(908) exit status = 1
What to do?
With kind regards
Jan Lichtenbelt
// Calculate the standard deviation
// Calculation:
// St_Dev = sqrt (St_Dev)
// St_Dev = St_Dev / (Nmax - 1)
// Temp = float2int (St_Dev + 0.5) // rounded
FCV_ST_DEV = float32_sqrt(FCV_ST_DEV);
FCV_ST_DEV = flt_div(FCV_ST_DEV, flt_fromi((FCV_NMAX - 1)));
FCV_TEMP = flt_toi(flt_add(FCV_ST_DEV, 0.5));
But I get the error message:
UVmeter_V9.c: main()
1656: FCV_ST_DEV = float32_sqrt(FCV_ST_DEV);
^ (361) function declared implicit int (warning)
UVmeter_V9.c: 1656: (1464) number of arguments passed to function "_float32_sqrt" does not match function's prototype (warning)
UVmeter_V9.c: 1679: (1464) number of arguments passed to function "_float32_sqrt" does not match function's prototype (warning)
0: (499) undefined symbol:
_float32_sqrt(UVmeter_V9.obj)
.
(908) exit status = 1
What to do?
With kind regards
Jan Lichtenbelt