# How do I get rid of the decimals?

**URL:** <https://community.homey.app/t/how-do-i-get-rid-of-the-decimals/107648>\
**Category:** Questions & Help\
**Created:** [April 4, 2024, 12:37pm UTC](https://community.homey.app/t/how-do-i-get-rid-of-the-decimals/107648 "2024-04-04T12:37:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Elmlund](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/david_elmlund/32/48960_2.png) [@David\_Elmlund](https://community.homey.app/u/David_Elmlund)\
**Post date:** [April 4, 2024, 12:37pm UTC](https://community.homey.app/t/how-do-i-get-rid-of-the-decimals/107648/1 "2024-04-04T12:37:47Z")

</div>

This formula…

{{((Temp\<0)_(4.689_(1.486+(Temp/100))^12.3)_(18.02/(8314.3_(273.15+Temp)))_1000+(Temp\>=0)_(288.68\*(1.098+(Temp/100))^8.02)_(18.02/(8314.3_(273.15+Relative humidity)))_1000)_  
/100}}

…generates a value with a lot of decimals. I only need one. Can this be solved anyhow?

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [April 4, 2024, 12:41pm UTC](https://community.homey.app/t/how-do-i-get-rid-of-the-decimals/107648/2 "2024-04-04T12:41:56Z")

</div>

```auto
round(value[, n])

```

Rounds `value` to `n` decimals, or 0 if not specified.

---

<div class="post-metadata">

**Author:** ![David\_Elmlund](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/david_elmlund/32/48960_2.png) [@David\_Elmlund](https://community.homey.app/u/David_Elmlund)\
**Post date:** [April 4, 2024, 7:50pm UTC](https://community.homey.app/t/how-do-i-get-rid-of-the-decimals/107648/3 "2024-04-04T19:50:41Z")

</div>

Like this?  
{{((Temp\<0)_(4.689_ (1.486+(Temp/100))^12.3)_(18.02/(8314.3_ (273.15+Temp)))_1000+(Temp\>=0)_ (288.68\*(1.098+(Temp/100))^8.02)_(18.02/(8314.3_ (273.15+Relative humidity)))_1000)_  
/100round(value[, 1])}}

---

<div class="post-metadata">

**Author:** ![SingKT](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/singkt/32/173226_2.png) [@SingKT](https://community.homey.app/u/SingKT)\
**Post date:** [April 4, 2024, 8:05pm UTC](https://community.homey.app/t/how-do-i-get-rid-of-the-decimals/107648/4 "2024-04-04T20:05:11Z")

</div>

Like: round( {{((Temp\<0)_(4.689_(1.486+(Temp/100))^12.3)_(18.02/(8314.3_(273.15+Temp)))_1000+(Temp\>=0)_(288.68\*(1.098+(Temp/100))^8.02)_(18.02/(8314.3_(273.15+Relative humidity)))_1000)_  
/100}},1)
