Floating point Info V3

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
MarkW
Flowcode v5 User
Posts: 118
Joined: Thu Sep 17, 2009 1:30 pm
Has thanked: 3 times
Been thanked: 11 times
Contact:

Floating point Info V3

Post by MarkW »

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

User avatar
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

Post by Benj »

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.

MarkW
Flowcode v5 User
Posts: 118
Joined: Thu Sep 17, 2009 1:30 pm
Has thanked: 3 times
Been thanked: 11 times
Contact:

Re: Floating point Info V3

Post by MarkW »

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

User avatar
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

Post by Benj »

Hi Mark

Yes thats correct about the floating point function. Let me know if you get stuck.

Post Reply