# Writing to datatype Float

**URL:** <https://forum.inductiveautomation.com/t/writing-to-datatype-float/24826>\
**Category:** Ignition Early Access\
**Tags:** ignition80\
**Created:** [May 9, 2019, 11:37am UTC](https://forum.inductiveautomation.com/t/writing-to-datatype-float/24826 "2019-05-09T11:37:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kleppe85](https://avatars.discourse-cdn.com/v4/letter/k/c4cdca/32.png) [@Kleppe85](https://forum.inductiveautomation.com/u/Kleppe85)\
**Post date:** [May 9, 2019, 11:37am UTC](https://forum.inductiveautomation.com/t/writing-to-datatype-float/24826/1 "2019-05-09T11:37:51Z")

</div>

Hi,  
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…

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 9, 2019, 12:07pm UTC](https://forum.inductiveautomation.com/t/writing-to-datatype-float/24826/2 "2019-05-09T12:07:42Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Kleppe85](https://avatars.discourse-cdn.com/v4/letter/k/c4cdca/32.png) [@Kleppe85](https://forum.inductiveautomation.com/u/Kleppe85)\
**Post date:** [May 9, 2019, 12:18pm UTC](https://forum.inductiveautomation.com/t/writing-to-datatype-float/24826/3 "2019-05-09T12:18:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Kleppe85](https://avatars.discourse-cdn.com/v4/letter/k/c4cdca/32.png) [@Kleppe85](https://forum.inductiveautomation.com/u/Kleppe85)\
**Post date:** [May 9, 2019, 12:27pm UTC](https://forum.inductiveautomation.com/t/writing-to-datatype-float/24826/4 "2019-05-09T12:27:16Z")

</div>

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