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
sqrt error
Moderator: Benj
- Jan Lichtenbelt
- Posts: 797
- Joined: Tue Feb 17, 2009 8:35 pm
- Location: Haren GN, the Netherlands
- Has thanked: 128 times
- Been thanked: 264 times
- Contact:
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
Re: sqrt error
Hi Jan,
Thanks for the bug spot.
I'm assuming this is with PIC
Updated CAL file attached, to go into Flowcode7 "CAL\PIC" directory
Thanks
Leigh
Thanks for the bug spot.
I'm assuming this is with PIC
Updated CAL file attached, to go into Flowcode7 "CAL\PIC" directory
Thanks
Leigh
- Attachments
-
- PIC_CAL_Float.c
- (5.19 KiB) Downloaded 253 times