dmmons
Member
Processor: Micrologix 1400
When doing subtraction using floating points (SUB F34:0 F94:10 F94:15 ) I am subtracting two values which have a maximum of 3 decimal places and always end in either 0 or 5.
For instance 12.440 - 11.445
I would expect and answer of 0.995, instead I get an answer of 0.9949999.
I suspect it is something to do with floating point math, but can't quite figure it out. Rockwell tech support is also working on a solution.
Anyone here have any ideas?
Thanks
When doing subtraction using floating points (SUB F34:0 F94:10 F94:15 ) I am subtracting two values which have a maximum of 3 decimal places and always end in either 0 or 5.
For instance 12.440 - 11.445
I would expect and answer of 0.995, instead I get an answer of 0.9949999.
I suspect it is something to do with floating point math, but can't quite figure it out. Rockwell tech support is also working on a solution.
Anyone here have any ideas?
Thanks