# Possible float == 0.0 bug in blueprints?

**URL:** <https://forums.unrealengine.com/t/possible-float-0-0-bug-in-blueprints/312238>\
**Category:** Blueprint\
**Tags:** possible-bug, branch, float, unreal-engine, question, Blueprint\
**Created:** [March 23, 2015, 12:02pm UTC](https://forums.unrealengine.com/t/possible-float-0-0-bug-in-blueprints/312238 "2015-03-23T12:02:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrpdean](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mrpdean](https://forums.unrealengine.com/u/mrpdean)\
**Post date:** [March 23, 2015, 12:02pm UTC](https://forums.unrealengine.com/t/possible-float-0-0-bug-in-blueprints/312238/1 "2015-03-23T12:02:24Z")

</div>

I cannot work out why this branch is evaluating to false when from what I can see it should be true.

Is this a bug?

 ![35434-blueprint.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/3/283926be8d9d61568be54bb7db8643d7ae0061c7.jpeg)

---

<div class="post-metadata">

**Author:** ![MarcAndreG](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MarcAndreG](https://forums.unrealengine.com/u/MarcAndreG)\
**Post date:** [March 23, 2015, 1:30pm UTC](https://forums.unrealengine.com/t/possible-float-0-0-bug-in-blueprints/312238/2 "2015-03-23T13:30:57Z")

</div>

Maybe there’s more precision after the 5th digit that you don’t see  
You can see example here : [A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums](https://wiki.unrealengine.com/Blueprint_Node:_Math_Node#Is_Float_nearly_equal_to)

As a rule of thumb never compare float with ==, always lead to weird errors.

Try using the IsNear (or IsNearZero in your case) so you can add error tolerance to your ==

---

<div class="post-metadata">

**Author:** ![mrpdean](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mrpdean](https://forums.unrealengine.com/u/mrpdean)\
**Post date:** [March 23, 2015, 3:01pm UTC](https://forums.unrealengine.com/t/possible-float-0-0-bug-in-blueprints/312238/3 "2015-03-23T15:01:06Z")

</div>

Thanks

I thought the debug output would show the exact value but perhaps not. Logic wise I’m fairly sure the value should be exactly zero at that point in the blueprint.

I’ll look into those other nodes you’ve suggested or else try to change the blueprint logic so that the checking for zero isn’t required.

Wish there was a double type variable for blueprints. Floats are a pain in some cases.

Thanks for you help.

---

<div class="post-metadata">

**Author:** ![Naton3030](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Naton3030](https://forums.unrealengine.com/u/Naton3030)\
**Post date:** [April 11, 2023, 6:17pm UTC](https://forums.unrealengine.com/t/possible-float-0-0-bug-in-blueprints/312238/4 "2023-04-11T18:17:41Z")

</div>

I’ve been getting a headache wondering why 0.0 != 0.0. lol I used the round function and now it works. Thank you
