KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Floating point calculation is neither associative nor distributive on processors. So, (a + b) + c is not equal to a + (b + c) and a * (b + c) is not equal to a * b + a * c Is there any way to perform deterministic floating point calculation that do not give different results. It would be deterministic on uniprocessor ofcourse, but it would not be deterministic in multithreaded programs if threads add to a sum for example, as there might be different interleavings of the threads. So my question is, how can one achieve deterministic results for floating point calculations in multithreaded programs?
Tags (comma-separated)
Save Edits
Cancel