Hi
I have followed the example on using floating point maths with V3
and with a bit of fiddling on my own got my program to run ok.
However I cannot seem to find any reference to the functions
that describes the operation thereof, or a list of the functions
available! I have looked at boostC manual etc and there is no
information about these functions. One particular function
that i need clarification on is:
FCV_VAR = float32_to_int32_round_to_zero(varx)
Does the round to zero simply discard the real part and return the whole part
of the calculation or does it actually round off the real part and increase or
leave alone the whole part of the answer? (this may have an effect on accuracy
of my calcs).
Also what is the most recent update on Flowcode V3? I have seen reference to a version
3.6xx somewhere here on the forums.....
Ben, Steve / anyone know?
Mark
Floating point Info V3
- 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: Floating point Info V3
Hello Mark
You can find the latest download versions of Flowcode by visiting the main Flowcode product page on our website.
The float32_to_int32_round_to_zero function rounds to an integer number but will always round down if it is a positive number and round up if it is a negative.
You can find the list of Floating point functions in the Flowcode V3/BoostC/Includes/Float.h file though it is not very well commented.
You can find the latest download versions of Flowcode by visiting the main Flowcode product page on our website.
The float32_to_int32_round_to_zero function rounds to an integer number but will always round down if it is a positive number and round up if it is a negative.
You can find the list of Floating point functions in the Flowcode V3/BoostC/Includes/Float.h file though it is not very well commented.
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
-
- Flowcode v5 User
- Posts: 118
- Joined: Thu Sep 17, 2009 1:30 pm
- Has thanked: 3 times
- Been thanked: 11 times
Re: Floating point Info V3
Thanx Ben
Yes, did look at the header file before and as you say its not very well documented.
But i will try to extract the info i need for the functions.
So, according to your statement about the round to zero function I assume I
am correct that if my var is always positive (always round down), then the answer will
simply be always the real part discarded? eg. var = 1234.xxxx will be var=1234.0000?
thanx for your input!
Mark
Yes, did look at the header file before and as you say its not very well documented.
But i will try to extract the info i need for the functions.
So, according to your statement about the round to zero function I assume I
am correct that if my var is always positive (always round down), then the answer will
simply be always the real part discarded? eg. var = 1234.xxxx will be var=1234.0000?
thanx for your input!
Mark
- 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: Floating point Info V3
Hi Mark
Yes thats correct about the floating point function. Let me know if you get stuck.
Yes thats correct about the floating point function. Let me know if you get stuck.
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