# Need to round float to one decimal point. Why is it so difficult?

**URL:** <https://forums.unrealengine.com/t/need-to-round-float-to-one-decimal-point-why-is-it-so-difficult/866763>\
**Category:** Blueprint\
**Tags:** unreal-engine, question, Blueprint\
**Created:** [April 7, 2023, 12:09am UTC](https://forums.unrealengine.com/t/need-to-round-float-to-one-decimal-point-why-is-it-so-difficult/866763 "2023-04-07T00:09:59Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![jwatte](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jwatte/32/744941_2.png) [@jwatte](https://forums.unrealengine.com/u/jwatte)\
**Post date:** [April 7, 2023, 2:02am UTC](https://forums.unrealengine.com/t/need-to-round-float-to-one-decimal-point-why-is-it-so-difficult/866763/8 "2023-04-07T02:02:43Z")

</div>

The reason is that _floating point numbers aren’t decimal_.  
It’s literally impossible to represent 0.1 exactly in a floating point number. Computer can’t do it.  
0.5, 0.25, 0.125, 0.0625, and other numbers that are _even fractions of 2_ are exactly representable.

The problem is that you’re doing this:

1. Try to represent a value that’s exactly 0.1
2. Present the value that’s stored above exactly

What you should be doing is:

1. Represent whatever the number actually is
2. Present the number with rounding in presentation, for example using `ToText (float)`

[https://docs.oracle.com/cd/E19957-01/806-3568/ncg\_goldberg.html](https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html)

---

_[View the full topic](https://forums.unrealengine.com/t/need-to-round-float-to-one-decimal-point-why-is-it-so-difficult/866763)._
