aboutsummaryrefslogtreecommitdiffstats
path: root/src/floatfns.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/floatfns.c')
-rw-r--r--src/floatfns.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/floatfns.c b/src/floatfns.c
index 89aa052e8b1..81cf6bdb61f 100644
--- a/src/floatfns.c
+++ b/src/floatfns.c
@@ -282,7 +282,9 @@ DEFUN ("tan", Ftan, Stan, 1, 1, 0,
282 return make_float (d); 282 return make_float (d);
283} 283}
284 284
285#if defined HAVE_ISNAN && defined HAVE_COPYSIGN 285#undef isnan
286#define isnan(x) ((x) != (x))
287
286DEFUN ("isnan", Fisnan, Sisnan, 1, 1, 0, 288DEFUN ("isnan", Fisnan, Sisnan, 1, 1, 0,
287 doc: /* Return non nil iff argument X is a NaN. */) 289 doc: /* Return non nil iff argument X is a NaN. */)
288 (Lisp_Object x) 290 (Lisp_Object x)
@@ -291,6 +293,7 @@ DEFUN ("isnan", Fisnan, Sisnan, 1, 1, 0,
291 return isnan (XFLOAT_DATA (x)) ? Qt : Qnil; 293 return isnan (XFLOAT_DATA (x)) ? Qt : Qnil;
292} 294}
293 295
296#ifdef HAVE_COPYSIGN
294DEFUN ("copysign", Fcopysign, Scopysign, 1, 2, 0, 297DEFUN ("copysign", Fcopysign, Scopysign, 1, 2, 0,
295 doc: /* Copy sign of X2 to value of X1, and return the result. 298 doc: /* Copy sign of X2 to value of X1, and return the result.
296Cause an error if X1 or X2 is not a float. */) 299Cause an error if X1 or X2 is not a float. */)
@@ -1030,8 +1033,8 @@ syms_of_floatfns (void)
1030 defsubr (&Scos); 1033 defsubr (&Scos);
1031 defsubr (&Ssin); 1034 defsubr (&Ssin);
1032 defsubr (&Stan); 1035 defsubr (&Stan);
1033#if defined HAVE_ISNAN && defined HAVE_COPYSIGN
1034 defsubr (&Sisnan); 1036 defsubr (&Sisnan);
1037#ifdef HAVE_COPYSIGN
1035 defsubr (&Scopysign); 1038 defsubr (&Scopysign);
1036 defsubr (&Sfrexp); 1039 defsubr (&Sfrexp);
1037 defsubr (&Sldexp); 1040 defsubr (&Sldexp);