diff options
Diffstat (limited to 'Build/source/libs/mpfr/mpfr-src/src/get_d128.c')
-rw-r--r-- | Build/source/libs/mpfr/mpfr-src/src/get_d128.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Build/source/libs/mpfr/mpfr-src/src/get_d128.c b/Build/source/libs/mpfr/mpfr-src/src/get_d128.c index 69b1d206458..2cd9f884be7 100644 --- a/Build/source/libs/mpfr/mpfr-src/src/get_d128.c +++ b/Build/source/libs/mpfr/mpfr-src/src/get_d128.c @@ -5,7 +5,7 @@ See https://gcc.gnu.org/legacy-ml/gcc/2006-06/msg00691.html, https://gcc.gnu.org/onlinedocs/gcc/Decimal-Float.html, and TR 24732 <http://www.open-std.org/jtc1/sc22/wg14/www/projects#24732>. -Copyright 2006-2020 Free Software Foundation, Inc. +Copyright 2006-2022 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -40,22 +40,21 @@ https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., static _Decimal128 get_decimal128_nan (void) { - return (_Decimal128) MPFR_DBL_NAN; + return 0.0dl / 0.0dl; } /* construct the decimal128 Inf with given sign */ static _Decimal128 get_decimal128_inf (int negative) { - return (_Decimal128) (negative ? MPFR_DBL_INFM : MPFR_DBL_INFP); + return negative ? - 1.0dl / 0.0dl : 1.0dl / 0.0dl; } /* construct the decimal128 zero with given sign */ static _Decimal128 get_decimal128_zero (int negative) { - _Decimal128 zero = 0; - return (_Decimal128) (negative ? -zero : zero); + return negative ? - 0.0dl : 0.0dl; } /* construct the decimal128 smallest non-zero with given sign: |