You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The number 15.32 is not exactly representable in binary floating-point format. Why this does not happen if you set it at variable creation I have no idea, but I am guessing this is the overall reason for observing this effect.
Hey @leoneifler, thanks for looking into this! That is true, but at least in Python the precision is much higher:
In this PR we reverted manual variable typing, which seems to be the cause for this. See here:
Me and Mo discussed this yesterday, we have a feeling it might be due to calls to float in other files, like expr.pxi. In fact, we played around with some of this (but I can't tell for sure what did it 😞) and the error above no longer appears:
I have encountered this behavior in other circumstances as well, that's why I haven't created a PR.
Does this all seem reasonable, Leon? What do you think?
Conversion of Python types to C types sometimes yields precision errors. It's not clear to me when and why this happens.
The values stay correct right up the call to
SCIPchgVarObj
in L1347Interestingly, if we set the objective at variable creation, the same doesn't happen.
System
pyscipopt
? SourceThe text was updated successfully, but these errors were encountered: