# Decimal Round Off

**URL:** <https://forum.inductiveautomation.com/t/decimal-round-off/29392>\
**Category:** Ignition\
**Created:** [October 25, 2019, 12:48pm UTC](https://forum.inductiveautomation.com/t/decimal-round-off/29392 "2019-10-25T12:48:08Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajeshbabu](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@rajeshbabu](https://forum.inductiveautomation.com/u/rajeshbabu)\
**Post date:** [October 25, 2019, 12:48pm UTC](https://forum.inductiveautomation.com/t/decimal-round-off/29392/1 "2019-10-25T12:48:08Z")

</div>

How do i handle the decimal round off (avoid greater than 0.5 getting rounded of 1).

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [October 25, 2019, 12:51pm UTC](https://forum.inductiveautomation.com/t/decimal-round-off/29392/2 "2019-10-25T12:51:50Z")

</div>

In what context?

---

<div class="post-metadata">

**Author:** ![rajeshbabu](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@rajeshbabu](https://forum.inductiveautomation.com/u/rajeshbabu)\
**Post date:** [October 25, 2019, 12:55pm UTC](https://forum.inductiveautomation.com/t/decimal-round-off/29392/3 "2019-10-25T12:55:27Z")

</div>

to display the derived values

---

<div class="post-metadata">

**Author:** ![RadicalRumin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/radicalrumin/32/11543_2.png) [@RadicalRumin](https://forum.inductiveautomation.com/u/RadicalRumin)\
**Post date:** [October 25, 2019, 1:56pm UTC](https://forum.inductiveautomation.com/t/decimal-round-off/29392/4 "2019-10-25T13:56:14Z")

</div>

Using what component do you want to display the values?

---

<div class="post-metadata">

**Author:** ![rajeshbabu](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@rajeshbabu](https://forum.inductiveautomation.com/u/rajeshbabu)\
**Post date:** [October 29, 2019, 9:49am UTC](https://forum.inductiveautomation.com/t/decimal-round-off/29392/5 "2019-10-29T09:49:06Z")

</div>

To display timing based part count.Presently the count doesn’t change till it crosses 0.5 and jumps to value related to 1 because of the upper round off.

---

<div class="post-metadata">

**Author:** ![RadicalRumin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/radicalrumin/32/11543_2.png) [@RadicalRumin](https://forum.inductiveautomation.com/u/RadicalRumin)\
**Post date:** [October 29, 2019, 9:55am UTC](https://forum.inductiveautomation.com/t/decimal-round-off/29392/6 "2019-10-29T09:55:17Z")

</div>

have you set the datatype of your component to double or float instead of integer?

---

<div class="post-metadata">

**Author:** ![rajeshbabu](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@rajeshbabu](https://forum.inductiveautomation.com/u/rajeshbabu)\
**Post date:** [October 29, 2019, 10:06am UTC](https://forum.inductiveautomation.com/t/decimal-round-off/29392/7 "2019-10-29T10:06:01Z")

</div>

it is integer

---

<div class="post-metadata">

**Author:** ![RadicalRumin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/radicalrumin/32/11543_2.png) [@RadicalRumin](https://forum.inductiveautomation.com/u/RadicalRumin)\
**Post date:** [October 29, 2019, 10:07am UTC](https://forum.inductiveautomation.com/t/decimal-round-off/29392/8 "2019-10-29T10:07:41Z")

</div>

integers don’t work with decimals, you’ll have to use either doubles or floats.

---

<div class="post-metadata">

**Author:** ![rajeshbabu](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@rajeshbabu](https://forum.inductiveautomation.com/u/rajeshbabu)\
**Post date:** [October 29, 2019, 10:18am UTC](https://forum.inductiveautomation.com/t/decimal-round-off/29392/9 "2019-10-29T10:18:05Z")

</div>

Thanks
