Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly static cast to long double #267

Merged
merged 2 commits into from
Jul 22, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 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
Loading