part of a UDT holds the following memory tags set to float data type.
I am familiar with float types changing, but my experience has always shown changes around .0000000001 and truncating or rounding took care of it. Moreover, I have never experienced the change affecting the value at the resolution where we have the format string set. Using the example I have below, I expected changes to my number to show up at thousandths and further out, not at tenths and hundredths.
In the tag Browser, when I enter 5.20 for our low value (or into any of the tags), it changes to 5.199999809 which can make a huge difference for us. Am I able to restrict resolution to hundredths, at the tag level? Or does anyone have any methods to stop this from ocurring besides changing everything to strings?
That’s not a bug. Just a limitation of binary floating point. It simply cannot represent exactly any “.2”. 32-bit versus 64-bit float just changes how many “9” there are before the repeating part. Some related discussions:
I do know is a behavior of that data type, and not a bug.
Is it safe to say; As long as values of the same resolution are entered and I round the values to the same resolution when using them, I do not need to be concerned about using a value that was not intended?
Thank you for the extra explanation and related discussions. I’ll give them a look.