John_B

07-23-2009, 07:13 PM

Hi All,

I've got some intensive floating maths to do.·The execution time isn't a constraint, so the floatMaths Spin version should be fine.

This is my first dabble·with the floatMath and floatString so I'm just trying a few functions out to see if the numbers are correct.

The routine below only displays a result with 7 digits, with the number of decimal places being determined by the·magnitude of the result. ie.

123.456 x 987.654 = 121931.8

23.456 x 87.654 =··· 2056.013

3.456 x 7.654 =······ 26.45223

········· tempx := fMath.fMul(3.456, 7.654)

········· com1.str(fString.FloatToString(tempx))

Is this correct? Or am I doing something daft? I can't find any documentation that gives an answer (no pun intended).

John

I've got some intensive floating maths to do.·The execution time isn't a constraint, so the floatMaths Spin version should be fine.

This is my first dabble·with the floatMath and floatString so I'm just trying a few functions out to see if the numbers are correct.

The routine below only displays a result with 7 digits, with the number of decimal places being determined by the·magnitude of the result. ie.

123.456 x 987.654 = 121931.8

23.456 x 87.654 =··· 2056.013

3.456 x 7.654 =······ 26.45223

········· tempx := fMath.fMul(3.456, 7.654)

········· com1.str(fString.FloatToString(tempx))

Is this correct? Or am I doing something daft? I can't find any documentation that gives an answer (no pun intended).

John