Skip to content

Commit

Permalink
Explicitly static cast to long double (#267)
Browse files Browse the repository at this point in the history
This fixes a very verbose warning that I noticed when installing the
library in a Visual Studio project on Windows.  And it just seems like a
clearly good change for its own sake, anyway.
  • Loading branch information
chiphogg authored Jul 22, 2024
1 parent e23614c commit 374221e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion au/code/au/magnitude.hh
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ constexpr MagRepresentationOrError<T> root(T x, std::uintmax_t n) {
// Always use `long double` for intermediate computations. We don't ever expect people to be
// calling this at runtime, so we want maximum accuracy.
long double lo = 1.0;
long double hi = x;
long double hi = static_cast<long double>(x);

// Do a binary search to find the closest value such that `checked_int_pow` recovers the input.
//
Expand Down

0 comments on commit 374221e

Please sign in to comment.