Repository navigation
Conversation
Zdev-Change-Id: Z5c93bdc69344351025efb0691a336874ba0c83aa9d6f22ccd43c8899bdd6ce83
Float::Interval in gecode/float/interval.hpp provides every interval operation FloatVal uses, written in Gecode style from the mathematics of each operation and licensed like the rest of Gecode. Each public operation opens one Float::Rounding and rounds through RoundingBase, so boost-006's barriers still apply. FloatVal does not use it yet. Focused tests cover outward rounding, singleton and empty intervals, and the comparison truth table; a temporary differential test checks that every result matches the vendored Boost interval bit for bit until the copy is removed. Zdev-Change-Id: Zf4ce2c26dcc990c3af6acc8d9e1ef911f4d24d5a52a56ec414b369a1284d1ec7
FloatVal now stores Float::Interval, and Float::RoundingBase and Float::Rounding are Gecode classes. The rounding mode is read and set with <cfenv>, or with _control87 for MSVC on x86 and x64. Rounding is a scope that saves the caller's mode and restores it, and it cannot be copied. FloatVal's public operations are unchanged, its comparisons call the native certainly-relations, and it is now trivially copyable. No float header includes Boost any more; the Boost copy stays only for the temporary differential test, which now checks FloatVal against it. Zdev-Change-Id: Zb0421a288f748b79528fe4e547c738571dac5eb690ffaa00dc5b799f9c222a1c
gecode/third-party and the temporary differential test are gone, together with every reference in the build, checks, Doxygen configuration, and documentation. Gecode no longer installs Boost headers or LICENSE_1_0.txt. Float::ScaleView is now trivially copyable like FloatVal, so the value-parameter check needs no allowed types; FloatVal is still passed by const& by convention. Zdev-Change-Id: Z93535760ded6e8a1ccd7d757347f7ece740feaa173116d8fc9850bde12deb770
The 7.0.0 entries describe Gecode's own Float::Interval and the removed Boost copy, the API changes of Float::RoundingBase, Float::Rounding, and FloatValImpType, and the trivially copyable FloatVal, whose by-value calling convention changes for the two exported functions that take it by value. Zdev-Change-Id: Zfb4cd384cd9b0d57890f4ecef2c4ec0803d04137d6a43586a4990458f0cc0537
This was referenced Nov 20, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Gecode has long vendored a copy of Boost.Interval under
gecode/third-partyjust to backFloatVal. This PR replaces it with Gecode's ownFloat::Interval, removing the vendored Boost dependency and headers completely.The work is split into five commits so the rounding fix, the new implementation, the switchover, and the Boost removal can each be reviewed on its own:
volatile asmon GCC and Clang, and avolatilestore/reload elsewhere), so neither Gecode nor applications need special floating-point compiler flags. Integer rounding usesfloorandceil, and the even-root bounds inpowandnrootgo through the same rounding helpers.Float::Interval(gecode/float/interval.hpp) is added beside the Boost copy, implementing every interval operationFloatValneeds in Gecode style with outward rounding throughFloat::RoundingBase. Temporary differential tests verify that every operation matches Boost bit for bit.FloatValswitches to storingFloat::Interval, andFloat::RoundingBaseandFloat::Roundingbecome Gecode classes using<cfenv>(or_control87on MSVC x86/x64).Roundingis a non-copyable RAII scope that saves and restores the caller's rounding mode.FloatValandFloat::ScaleViewalso become trivially copyable, removing the last entry fromAllowedTypesin the value-parameter check (thoughFloatValstays passed byconst&by convention).gecode/third-party, the temporary differential tests, and the installed Boost headers andLICENSE_1_0.txtare removed.changelog.inrecords the new native library, the API changes toFloat::RoundingBase,Float::Rounding, andFloatValImpType, and the ABI note for the two exported functions takingFloatValby value.Testing
Tested before the stack split on arm64 macOS:
-O0,-O2, and-O3.Because MSVC cannot be built locally, Windows CI is the only place the
_control87and per-operation rounding paths execute. Those jobs passed on the earlier unified version of #274.Stack
Merge in this order. #242 targets
main, and each later PR builds on the one before it so its diff shows only its own commits. The first four PRs are standalone search and random-number changes; #284 through #274 are the Gecode 7 changes split out of what used to be a single branch.