[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GLPSOL in webassemby faster than native ?

From: Michael Hennebry
Subject: Re: GLPSOL in webassemby faster than native ?
Date: Sun, 27 Sep 2020 13:43:51 -0500 (CDT)
User-agent: Alpine 2.20 (DEB 67 2015-01-07)

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.

"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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]