Download

Cross-platrform floating point indeterminism

This is more of a question than feedback, but as it is a question for somebody from Epic, this seems like the best place to ask it.

I have just read this text on Gamasutra: http://gamasutra.com/blogs/MaksymHryniv/20150107/233596/Cross_platform_RTS_synchronization_and_floating_point_indeterminism.php

In short words it does treat about floating point calculations on different platforms.

So my question is: Does UE4 do it’s floating point calculations in a fully deterministic way on all supported platforms?

Basic floating-point arithmetic on the CPU follows the IEEE 754 standard and is therefore identical across platforms. However, GPUs relax the rules and don’t guarantee consistency. And CPUs differ in implementation of transcendantal functions like exp, sin, cos, pow. Generally as a game developer, these differences shouldn’t be significant, as UE4’s variable frame-rate model doesn’t ensure consistency of engine execution under identical input, and is designed to be generally numerically robust.