how to implement logarithmic function in flow code v4,
i'm able to find the function in ARM,but its not available in PIC,
kindly suggest the equivalent methods for PIC,
i need to calculate log10 value of some expressions;
e.g. log10 (h)=?
Logarithm function
Moderator: Benj
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Logarithm function
Hello,
There is no log function in BoostC as such so you cannot call it directly.
The best bet would be to use the look up table approach. Eg work out all the values of log that you will need for your program and store them all into an array. The Articles section of the forum has a good guide on creating look up tables.
There is no log function in BoostC as such so you cannot call it directly.
The best bet would be to use the look up table approach. Eg work out all the values of log that you will need for your program and store them all into an array. The Articles section of the forum has a good guide on creating look up tables.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Logarithm function
as i wanted to make dew point calculation, the LOOK UP table approach is not suitable for my apllication.if you have any other method pls suggest me
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Logarithm function
The Hi Tech compiler support the log function. There are instructions for using Hi Tech with v4 of Flowcode in the articles section of the forums.
Otherwise I would use a AVR or an ARM as the GCC compiler handles floats and complex calculations quite well.
Otherwise I would use a AVR or an ARM as the GCC compiler handles floats and complex calculations quite well.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel