umFPU3.1 and FloatString...?
Javalin
Posts: 892
Evening all,
Both of these; the IC and the object say they read/write/etc IEE754 format floating point numbers.· Are they thus "compatible"?
I am trying to use the FPU to perform calculations and then store the raw IEE754 floating point in a LONG variable in the prop, for other cogs to either: 1) decode into a string for screen presentation
2) convert into float*100 for transmission to VB
I want to avoid performing math on the prop, and doing to much math (time constraints) on the FPU - hence the method above.
I've got a reasonable way - just for example the float string values are not quite whats in the FPU.· I.e. for a value in the FPU of 109 Float string gives "110", and for 1024.5 I get "1000" back.
Am I missing something? (or quite a lot!)
Cheers,
James
Both of these; the IC and the object say they read/write/etc IEE754 format floating point numbers.· Are they thus "compatible"?
I am trying to use the FPU to perform calculations and then store the raw IEE754 floating point in a LONG variable in the prop, for other cogs to either: 1) decode into a string for screen presentation
2) convert into float*100 for transmission to VB
I want to avoid performing math on the prop, and doing to much math (time constraints) on the FPU - hence the method above.
I've got a reasonable way - just for example the float string values are not quite whats in the FPU.· I.e. for a value in the FPU of 109 Float string gives "110", and for 1024.5 I get "1000" back.
Am I missing something? (or quite a lot!)
Cheers,
James
Comments
You were spot on!
I had "'Fstring.SetPrecision(2)"
in the code - removed the line and all is good.
Thanks for your help!!!
James