diff options
| author | Stephen Leake | 2019-09-10 03:37:51 -0700 |
|---|---|---|
| committer | Stephen Leake | 2019-09-10 03:37:51 -0700 |
| commit | 3d442312889ef2d14c07282d0aff6199d00cc165 (patch) | |
| tree | 74034ca2dded6ed233d0701b4cb5c10a0b5e9034 /src/floatfns.c | |
| parent | ac1a2e260e8ece34500b5879f766b4e54ee57b94 (diff) | |
| parent | 74e9799bd89484b8d15bdd6597c68fc00d07e7f7 (diff) | |
| download | emacs-3d442312889ef2d14c07282d0aff6199d00cc165.tar.gz emacs-3d442312889ef2d14c07282d0aff6199d00cc165.zip | |
Merge commit '74e9799bd89484b8d15bdd6597c68fc00d07e7f7'
Diffstat (limited to 'src/floatfns.c')
| -rw-r--r-- | src/floatfns.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/floatfns.c b/src/floatfns.c index a913aad5aac..9049185307c 100644 --- a/src/floatfns.c +++ b/src/floatfns.c | |||
| @@ -48,6 +48,14 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ | |||
| 48 | 48 | ||
| 49 | #include <count-leading-zeros.h> | 49 | #include <count-leading-zeros.h> |
| 50 | 50 | ||
| 51 | /* Emacs needs proper handling of +/-inf; correct printing as well as | ||
| 52 | important packages depend on it. Make sure the user didn't specify | ||
| 53 | -ffinite-math-only, either directly or implicitly with -Ofast or | ||
| 54 | -ffast-math. */ | ||
| 55 | #if defined __FINITE_MATH_ONLY__ && __FINITE_MATH_ONLY__ | ||
| 56 | #error Emacs cannot be built with -ffinite-math-only | ||
| 57 | #endif | ||
| 58 | |||
| 51 | /* Check that X is a floating point number. */ | 59 | /* Check that X is a floating point number. */ |
| 52 | 60 | ||
| 53 | static void | 61 | static void |
| @@ -268,9 +276,9 @@ DEFUN ("abs", Fabs, Sabs, 1, 1, 0, | |||
| 268 | } | 276 | } |
| 269 | else | 277 | else |
| 270 | { | 278 | { |
| 271 | if (mpz_sgn (XBIGNUM (arg)->value) < 0) | 279 | if (mpz_sgn (*xbignum_val (arg)) < 0) |
| 272 | { | 280 | { |
| 273 | mpz_neg (mpz[0], XBIGNUM (arg)->value); | 281 | mpz_neg (mpz[0], *xbignum_val (arg)); |
| 274 | arg = make_integer_mpz (); | 282 | arg = make_integer_mpz (); |
| 275 | } | 283 | } |
| 276 | } | 284 | } |
| @@ -315,7 +323,7 @@ This is the same as the exponent of a float. */) | |||
| 315 | value = ivalue - 1; | 323 | value = ivalue - 1; |
| 316 | } | 324 | } |
| 317 | else if (!FIXNUMP (arg)) | 325 | else if (!FIXNUMP (arg)) |
| 318 | value = mpz_sizeinbase (XBIGNUM (arg)->value, 2) - 1; | 326 | value = mpz_sizeinbase (*xbignum_val (arg), 2) - 1; |
| 319 | else | 327 | else |
| 320 | { | 328 | { |
| 321 | EMACS_INT i = XFIXNUM (arg); | 329 | EMACS_INT i = XFIXNUM (arg); |