On Fri, 25 Sep 2020, Andrew Makhorin wrote:
Why do you want glpk to produce absolutely identical results on different platforms? This has no practical sense.
In some cases, it does make sense, but in C89 might be difficult to achieve. If the different platforms have effectively identical floating point processors, getting identical numerical results should be possible. If not, it suggests bugs or a misunderstanding. Practicality is another is another issue. Roadblocks include the toolchain and the system libraries. C, especially C89, allows compilers plenty of wiggle room. Removing it might not be possible in C89, though I think it is in C99. Even in C99, constants can be tricky. The compiler has a choice between evaluating at compile time or at run time. On a native compiler, the distinction is usually unimportant. On a cross-compiler, it can matter. The math library can matter. IEEE precisely defines square root, but not trig functions, log or exp10. C89 does not precisely define square root. Does GLPK use any of those? They would not necessarily have to be used in computing a solution. Using them to score prospective B&C nodes could cause differences. Similarly, the IO library can matter. When reading a floating point number, scanf has wiggle room. Removing the above roadbloacks, even for different platforms on the same machine might be difficult, but if accomplished, would make a useful check on correctness. -- Michael henne...@web.cs.ndsu.nodak.edu "Sorry but your password must contain an uppercase letter, a number, a haiku, a gang sign, a heiroglyph, and the blood of a virgin." -- someeecards