Hi all
is there a list specifying what math functions are available in flowcode ?
cheers
joe
math ability
Re: math ability
Hi Joe
Here is the list of functions taken from the latest help file.
( )  Parentheses.
= <> Equal to, Not equal to.
+  * / MOD  Addition, Subtraction, Multiplication, Division & Modulus.
< <= > >=  Less than, Less than or equal to, Greater than, Greater than or equal to.
>> <<  Shift right, Shift left.
NOT AND OR XOR  NOT(inversion), AND, OR, Exclusive OR
Functions (Flowcode for ARM only)
Flowcode includes an additional set of mathematical functions:
fabs( x ), floor( x ), ceil( x )  absolute value, floor and ceiling functions
round( x )  decimal rounding (x rounded to the nearest integer)
fround( x , y )  floating point rounding (x rounded to y decimal places)
fmod( x , y )  floating point modulus (remainder of x divided by y)
sqrt( x ), cbrt( x )  square and cube roots
log( x ), log10( x )  logarithms (base e and base 10)
exp( x ), pow( x , y )  exponential and power functions (x to the power of y)
sin( x ), cos( x ), tan( x )  trigonometric functions
asin( x ), acos( x ), atan( x ),  inverse trigonometric functions
atan2( y , x )  fourquadrant inverse tangent
sinh( x ), cosh( x ), tanh( x )  hyperbolic functions
asinh( x ), acosh( x ), atanh( x )  inverse hyperbolic functions
fact( x )  factorial
random( )  random number between 0 and 32767
isnan( x ), isinf( x )  tests for notanumber and infinity
Here is the list of functions taken from the latest help file.
( )  Parentheses.
= <> Equal to, Not equal to.
+  * / MOD  Addition, Subtraction, Multiplication, Division & Modulus.
< <= > >=  Less than, Less than or equal to, Greater than, Greater than or equal to.
>> <<  Shift right, Shift left.
NOT AND OR XOR  NOT(inversion), AND, OR, Exclusive OR
Functions (Flowcode for ARM only)
Flowcode includes an additional set of mathematical functions:
fabs( x ), floor( x ), ceil( x )  absolute value, floor and ceiling functions
round( x )  decimal rounding (x rounded to the nearest integer)
fround( x , y )  floating point rounding (x rounded to y decimal places)
fmod( x , y )  floating point modulus (remainder of x divided by y)
sqrt( x ), cbrt( x )  square and cube roots
log( x ), log10( x )  logarithms (base e and base 10)
exp( x ), pow( x , y )  exponential and power functions (x to the power of y)
sin( x ), cos( x ), tan( x )  trigonometric functions
asin( x ), acos( x ), atan( x ),  inverse trigonometric functions
atan2( y , x )  fourquadrant inverse tangent
sinh( x ), cosh( x ), tanh( x )  hyperbolic functions
asinh( x ), acosh( x ), atanh( x )  inverse hyperbolic functions
fact( x )  factorial
random( )  random number between 0 and 32767
isnan( x ), isinf( x )  tests for notanumber and infinity
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: math ability
I've just downloaded the trial version of Flowcode v6.I tried to use the Calculation component but got a compiling error when I entered tanh().Simmilarly with sinh()
Why is this?
I circumvented the problem by the successful use of exp(). Is this an intended limitation of the trial version?
Why is this?
I circumvented the problem by the successful use of exp(). Is this an intended limitation of the trial version?
Re: math ability
The 8bit PIC version of Flowcode supports Float variables but not the float functions such as tan and tanh. We are currently looking into switching compilers for 8bit PIC to remove this problem.I've just downloaded the trial version of Flowcode v6.I tried to use the Calculation component but got a compiling error when I entered tanh().Simmilarly with sinh()
Why is this?
I circumvented the problem by the successful use of exp(). Is this an intended limitation of the trial version?
All other variants of Flowcode, ARM, AVR and 16bit PIC should work fine with the floating point functions.
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

 Posts: 4
 Joined: Sun Mar 01, 2015 2:07 pm
 Contact:
Re: math ability
Hi Ben, this is something I'm having trouble with now. I see that its been about 6 months with this post and I was wondering if there have been any developments with it?
Thanks
Thanks
Re: math ability
Hello Stuart,
No this compiler change has now been pushed back to Flowcode 7 which is still a fair way off. Can you switch to another microcontroller family for now?
No this compiler change has now been pushed back to Flowcode 7 which is still a fair way off. Can you switch to another microcontroller family for now?
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

 Posts: 4
 Joined: Sun Mar 01, 2015 2:07 pm
 Contact:
Re: math ability
I could do. I'm currently using a 16F1937. Is there a similar device you can recommend?
Re: math ability
Hello Stuart,
How about a ATMEGA328P (chip used commonly on Arduino) or a dsPIC33EP device (same family as we use on the ECIO40P16 device).
How about a ATMEGA328P (chip used commonly on Arduino) or a dsPIC33EP device (same family as we use on the ECIO40P16 device).
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