Set Precise Float

Found a weird bug in 4.22 that doesn’t exist in 4.21.
To reproduce :
Open level blueprint.
Add ‘Compare Float’ node.
Enter 6.2 in the ‘Compare With’ entry.
Ponder the universe and it’s vastness…

Not a bug.
https://www.floating-point-gui.de/

I’m not adding anything just entering a float into a float entry. Weird thing is I can enter up to 3.5 but anything after that gets broken. I’ve done this before to compare floats, as the node no doubt is intended to do. It’s fine in 4.21. It’s a bug I’m pretty sure of that.

It is not a bug, just floating point precision.
As pointed by Raildex_: https://www.floating-point-gui.de/

Edit: If you need more precision you can use double. A tool in marketplace.

It worked fine before for my needs and now it doesn’t. I’ll find a workaround and call it a reduction in functionality, because it’s not a bug. Not keen on purchasing a plugin just so I can check if a float variable is equal to 6.2 or not. Makes the is equal to function pretty useless if it can’t check to the 10th.

The plugin is just to illustrate you about the “issue”. If you are so convinced that it is a bug, report it directly to Epic:
https://forums.unrealengine.com/unreal-engine/feedback-for-epic/88-how-to-report-a-bug

I can find an alternative to what I need it’s not a big problem just making a note. Thank you for your help.

Not a bug, just a float value… That’s what *Nearly Equal *is for:

Capture.PNG

You don’t need to love it, just error tolerate it.

1 Like

Haven’t needed it pre 4.22 with ‘Compare Float’ but that ‘Nearly Equal’ node could come in handy ta.