# Why does my float round my numbers?

**URL:** <https://forums.unrealengine.com/t/why-does-my-float-round-my-numbers/415974>\
**Category:** Community & Industry Discussion\
**Tags:** math, unreal-engine, question\
**Created:** [January 31, 2018, 1:31am UTC](https://forums.unrealengine.com/t/why-does-my-float-round-my-numbers/415974 "2018-01-31T01:31:05Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ghuuuu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ghuuuu](https://forums.unrealengine.com/u/ghuuuu)\
**Post date:** [January 31, 2018, 1:31am UTC](https://forums.unrealengine.com/t/why-does-my-float-round-my-numbers/415974/1 "2018-01-31T01:31:05Z")

</div>

Hey all, I would like to ask you guys to try and do this math in UE4:

2458149 + (68.7/86400) = 2458149.000795139

However when I do it, I get only 2458149. Where are my decimals? Is it limited or something? Does anyone know why it does that? When I did (68.7/86400), I got the decimals I wanted, 0.000795139, but when i added the 2458149, it outputs just the 2458149. Hope someone knows whats up!

---

<div class="post-metadata">

**Author:** ![Micky](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Micky](https://forums.unrealengine.com/u/Micky)\
**Post date:** [January 31, 2018, 1:52pm UTC](https://forums.unrealengine.com/t/why-does-my-float-round-my-numbers/415974/2 "2018-01-31T13:52:03Z")

</div>

Check if everything involved in your calculations are floats.  
Even the operators like “add” can be floats or ints

---

<div class="post-metadata">

**Author:** ![FSapio](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/fsapio/32/1194616_2.png) [@FSapio](https://forums.unrealengine.com/u/FSapio)\
**Post date:** [January 31, 2018, 1:59pm UTC](https://forums.unrealengine.com/t/why-does-my-float-round-my-numbers/415974/3 "2018-01-31T13:59:11Z")

</div>

Maybe you can provide the code and/or the blueprint in which you do this calculation, this would help to find the problem.

---

<div class="post-metadata">

**Author:** ![ghuuuu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ghuuuu](https://forums.unrealengine.com/u/ghuuuu)\
**Post date:** [January 31, 2018, 2:01pm UTC](https://forums.unrealengine.com/t/why-does-my-float-round-my-numbers/415974/4 "2018-01-31T14:01:15Z")

</div>

Yeah they are all floats, and actually I have a lot more problems adding, dividing etc of huge numbers with huge decimal places. Sometimes when I type in a 9 digit number, the editor will always revert to a smaller number, as if there is a cap on it.

---

<div class="post-metadata">

**Author:** ![ThompsonN13](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ThompsonN13](https://forums.unrealengine.com/u/ThompsonN13)\
**Post date:** [January 31, 2018, 3:00pm UTC](https://forums.unrealengine.com/t/why-does-my-float-round-my-numbers/415974/5 "2018-01-31T15:00:03Z")

</div>

there are limits on floats. I dont know the limits specifically implemented in unreal but usually theres a limit on how high of value or how many decimal places. in this case it may just be a limit to how many numbers you can use. Floats were never really meant to be used for huge numbers thats why theres integers.

> **[Floating-point arithmetic](https://en.wikipedia.org/wiki/Floating-point_arithmetic)**
>
> In computing, floating-point arithmetic (FP) is arithmetic using formulaic representation of real numbers as an approximation to support a trade-off between range and precision. For this reason, floating-point computation is often used in systems with very small and very large real numbers that require fast processing times. In general, a floating-point number is represented approximately with a fixed number of significant digits (the significand) and scaled using an exponent in some fixed base...

[http://en.cppreference.com/w/c/types/limits](http://en.cppreference.com/w/c/types/limits)

> **[Max and min floating point values - 
		
		Epic Games Forums](https://forums.epicgames.com/udk/udk-development/udk-programming-and-unrealscript/269741-max-and-min-floating-point-values)**
>
> Game programming using the Unreal Development Kit.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_056d0a8b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_056d0a8b](https://forums.unrealengine.com/u/anonymous_user_056d0a8b)\
**Post date:** [October 4, 2018, 12:38am UTC](https://forums.unrealengine.com/t/why-does-my-float-round-my-numbers/415974/6 "2018-10-04T00:38:43Z")

</div>

This is the correct answer. To clarify, “floating-point precision” refers to the fact that the larger a number is, the fewer decimal places will be accounted for. Go to [IEEE 754 Calculator](http://weitz.de/ieee/) and click “binary32” at the bottom of the page (for float instead of double), and then try your math problem. You’ll see that this is a limitation of the float data type itself.

---

<div class="post-metadata">

**Author:** ![mckay421](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mckay421](https://forums.unrealengine.com/u/mckay421)\
**Post date:** [November 27, 2026, 7:58am UTC](https://forums.unrealengine.com/t/why-does-my-float-round-my-numbers/415974/7 "2026-11-27T07:58:14Z")

</div>

Well I encountered same problem. So I just cast int value to float
