[Clp] large int (int64_t) overflow?
Michael Hennebry
hennebry at web.cs.ndsu.nodak.edu
Sun Jul 19 18:35:09 EDT 2015
On Sun, 19 Jul 2015, Emerson wrote:
> I think the reason behind this is "double" datatype precision. It's so hard
> to find exact "0" but much easier to find a non-zero solution. Even I
> changed 0 to a large number, say demand, the solver will still give me a
> larger than 0 solution.
> Since my problem setting is very large, this 0.1 factor won't impact the
> result at all. But I'm wondering anyone can give an exactly detailed
> explanation for this? Thanks
IIRC the standard term for your issue is "poorly scaled problem".
Not only does double have a finite precision, roundoff errors propagate.
Authors of well-written mathematical code
that uses floating point found ways to deal.
To that end, some small non-zero numbers are treated as zero
and some pairs of not-quite-equal numbers are treated as equal.
8000000000000. and 8000000000001. are likely such a pair.
The double value obtained from 0.1 is not exactly one tenth.
8000000000. can be represnted exactly.
Even so, as computed,
8000000000. - 0.1 - 8000000000. != 0.1
8000000000. + 0.1 - 8000000000.
--
Michael hennebry at web.cs.ndsu.NoDak.edu
"SCSI is NOT magic. There are *fundamental technical
reasons* why it is necessary to sacrifice a young
goat to your SCSI chain now and then." -- John Woods
More information about the Clp
mailing list