Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: fb453d776902
Choose a base ref
...
head repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2430ca56ce4b
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Jul 7, 2021

  1. Copy the full SHA
    9123f96 View commit details
  2. Merge pull request #3056 from eggrobin/constexpr-overflow

    Sign error, and it is probably a good idea to #include the macros
    eggrobin authored Jul 7, 2021
    Copy the full SHA
    2430ca5 View commit details
Showing with 2 additions and 1 deletion.
  1. +2 −1 numerics/next_body.hpp
3 changes: 2 additions & 1 deletion numerics/next_body.hpp
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@

#include <limits>

#include "base/macros.hpp"
#include "numerics/log_b.hpp"
#include "numerics/scale_b.hpp"

@@ -54,7 +55,7 @@ constexpr SourceFormat NextUp(SourceFormat const x) {
// |x + ulp| below results in positive infinity and signals the overflow
// exception. On compilers that think overflow is non-constexpr, explicitly
// return an infinity.
if (x == -std::numeric_limits<SourceFormat>::max()) {
if (x == std::numeric_limits<SourceFormat>::max()) {
return std::numeric_limits<SourceFormat>::infinity();
}
#endif