0

I have to determine whether or not a solution certified on one particular OS (Linux distro A) will run exactly the same way on another OS (Linux distro B) just because Linux distro B is fully binary compatible with Linux distro A.

My concern is that the solution uses a lot of libraries, certified on Linux distro A only. Those libraries are making calculations using floating points. Users are afraid that if the solution runs on Linux distro B, it could lead in inaccuracy in decimal for those calculations. This inaccuracy multiplied by billions of transactions becomes a serious issue.

As far as I understand, the inaccuracy of decimal (or let's say the difference of result) between 2 binaries of the same library is induced by the fact that, at the compilation, the generated assembly instructions are not the same (or in different order).

So, as long as those libraries are not recompiled, I could expect the exact same results on Linux distro A and Linux distro B, right? Or am I missing something?

Eric Postpischil
  • 195,579
  • 13
  • 168
  • 312
Gaëlle
  • 11
  • I am not positive floating-point results are guaranteed to be the same even for the same Linux distribution for different processor models. For example, there are some reciprocal-estimate instructions that do not think are specified to produce exactly the same result for the same input. They might, but I do not think it is guaranteed in the documentation. So a program that uses that might get different results on different processors. – Eric Postpischil Jun 22 '22 at 21:24
  • Similarly, I do not think the old trigonometry instructions (`fsin`, `fcos`, `fsincos`, `fptan`, and `fpatan`) are specified to produce the same results on different processor models. The documentation says the algorithms changed in the Pentium processors, so the instructions changed once. Even if they are the same on all current processor models, maybe they could change again. – Eric Postpischil Jun 22 '22 at 21:28
  • Thank you @EricPostpischil. I'm not very concerned by the processor. I can use the same type. But I can't use the same Linux distribution... I can only use another one that is guaranteed to be 100% binary compatible. I hope my question is clearer now – Gaëlle Jun 24 '22 at 12:40

0 Answers0