Writing to datatype Float

I don’t know if this is a bug, or if it’s supposed to be this way.

But when I i.e. write 4.95 to a float type tag (memory tag), I actually write “4.949999809” according to Ignition…Doesn’t look good if you want to write a different value, and the only thing you see is “…9809” in the input field…

This is not a bug. This is how floating point works. There is no exact binary representation of 4.95, so it repeats (in binary). You must use rounding at the point of display to hide these artifacts. Regular floats have the possibility of artifacts after 6 or 7 digits. Doubles show artifacts after ~15 digits.


Is it possibe to use rounding when pressing the i “numeric entry field”?

Weird, suddenly changed behavior. Don’t see the last digits in the entry field any more… Guess it’s working as it should then :slight_smile: