Skip to content

Commit

Permalink
Enable conversions to 80 and 128 bit long doubles
Browse files Browse the repository at this point in the history
  • Loading branch information
mborland committed Oct 7, 2024
1 parent df650ed commit 833b6e3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions include/boost/decimal/decimal64.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -970,8 +970,7 @@ BOOST_DECIMAL_CXX20_CONSTEXPR decimal64::operator double() const noexcept

BOOST_DECIMAL_CXX20_CONSTEXPR decimal64::operator long double() const noexcept
{
// TODO(mborland): Don't have an exact way of converting to various long doubles
return static_cast<long double>(to_float<decimal64, double>(*this));
return to_float<decimal64, long double>(*this);
}

#ifdef BOOST_DECIMAL_HAS_FLOAT16
Expand Down
3 changes: 1 addition & 2 deletions include/boost/decimal/decimal64_fast.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -885,8 +885,7 @@ BOOST_DECIMAL_CXX20_CONSTEXPR decimal64_fast::operator double() const noexcept

BOOST_DECIMAL_CXX20_CONSTEXPR decimal64_fast::operator long double() const noexcept
{
// TODO(mborland): Don't have an exact way of converting to various long doubles
return static_cast<long double>(to_float<decimal64_fast, double>(*this));
return to_float<decimal64_fast, long double>(*this);
}

#ifdef BOOST_DECIMAL_HAS_FLOAT16
Expand Down

0 comments on commit 833b6e3

Please sign in to comment.