• Jason Rhinelander's avatar
    constrained_maximum_search fixes · 642f7423
    Jason Rhinelander authored
    - Specifying NaN for automatic `right` selection resulted in an infinite
      loop when `left` was 0.  Changed to start searching at 1.0 when that
    - The `constrained_minimum_search` didn't implement automatic `right`
      selection; fixed.
    - Minor tweaks to calculation to avoid promotion to double; the main
      change was introducing a `half()` function to handle division by 2
      without resorting to actual division for floating points while still
      working for non-floating point domain types.
    - Fixed a typo in the static_assert for a `bool` return type in
algorithms.hpp 23.9 KB