@@ -1085,6 +1085,9 @@ template <typename T> bool round_to_long(T x, long &result) {
10851085template bool round_to_long<float >(float , long &);
10861086template bool round_to_long<double >(double , long &);
10871087template bool round_to_long<long double >(long double , long &);
1088+ #ifdef LIBC_TYPES_HAS_FLOAT16
1089+ template bool round_to_long<float16>(float16, long &);
1090+ #endif
10881091
10891092template <typename T> bool round_to_long (T x, RoundingMode mode, long &result) {
10901093 MPFRNumber mpfr (x);
@@ -1094,6 +1097,9 @@ template <typename T> bool round_to_long(T x, RoundingMode mode, long &result) {
10941097template bool round_to_long<float >(float , RoundingMode, long &);
10951098template bool round_to_long<double >(double , RoundingMode, long &);
10961099template bool round_to_long<long double >(long double , RoundingMode, long &);
1100+ #ifdef LIBC_TYPES_HAS_FLOAT16
1101+ template bool round_to_long<float16>(float16, RoundingMode, long &);
1102+ #endif
10971103
10981104template <typename T> T round (T x, RoundingMode mode) {
10991105 MPFRNumber mpfr (x);
@@ -1104,7 +1110,9 @@ template <typename T> T round(T x, RoundingMode mode) {
11041110template float round<float >(float , RoundingMode);
11051111template double round<double >(double , RoundingMode);
11061112template long double round<long double >(long double , RoundingMode);
1113+ #ifdef LIBC_TYPES_HAS_FLOAT16
11071114template float16 round<float16>(float16, RoundingMode);
1115+ #endif
11081116
11091117} // namespace mpfr
11101118} // namespace testing
0 commit comments