[Cbc] integer overflow in CglGomory.cpp
John Forrest
john.forrest at fastercoin.com
Tue May 16 14:44:06 EDT 2017
Modified in trunk (can be copied to stable). Just for now I have left
it as was unless GOMORY_LONG is defined in configure. If anyone is
interested they could see what difference it makes (on my first test it
was slower - but then invalid cuts can be very powerful!). There may be
some connection with queries about accuracy of Gomory cuts in 2015
(GOMORY_RELAX_NUMBER).
John Forrest
On 16/05/17 10:47, Tobias Stengel wrote:
>
> Hi,
>
> I noticed an integer overflow in CglGomory.cpp /
> nearestRational(double, int) lines 445 and 446. That specific MIP is
> solved correctly, but I have no idea whether such an overflow can lead
> to wrong cuts that e.g. cut off the optimal solution. Anyway integer
> overflow is undefined behaviour in C/C++ and the returned fractional
> is not „near“ the input…
>
> 2 parameter sets for nearestRational that lead to overflow can be
> found in the attached test program. Does anyone know how
> nearestRational works and how the overflow can be fixed properly?
>
> Thanks
>
> Tobias
>
>
>
> _______________________________________________
> Cbc mailing list
> Cbc at list.coin-or.org
> https://urldefense.proofpoint.com/v2/url?u=https-3A__list.coin-2Dor.org_mailman_listinfo_cbc&d=DwICAg&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=js2M0T-3OIMIVDvokcKjokJbk0F8QOCd0mT4FsVFE88&m=L7AT776VDQX3BSKmHST7549RZsaJ2y94DaRP4TUG7Q4&s=nhL5_z_yBvb0pFHQ119ru9uHYjq2HWhTiD1goMhbxt8&e=
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/cbc/attachments/20170516/02ac61f4/attachment.html>
More information about the Cbc
mailing list