HCoop
/
bpt
/
emacs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* lisp/progmodes/js.el: Add notes in comments.
[bpt/emacs.git]
/
src
/
floatfns.c
diff --git
a/src/floatfns.c
b/src/floatfns.c
index
89aa052
..
305c78c
100644
(file)
--- a/
src/floatfns.c
+++ b/
src/floatfns.c
@@
-1,6
+1,6
@@
/* Primitive operations on floating point for GNU Emacs Lisp interpreter.
/* Primitive operations on floating point for GNU Emacs Lisp interpreter.
-Copyright (C) 1988, 1993-1994, 1999, 2001-201
1
+Copyright (C) 1988, 1993-1994, 1999, 2001-201
2
Free Software Foundation, Inc.
Author: Wolfgang Rupprecht
Free Software Foundation, Inc.
Author: Wolfgang Rupprecht
@@
-71,7
+71,7
@@
along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
extern double logb (double);
#endif /* not HPUX and HAVE_LOGB and no logb macro */
extern double logb (double);
#endif /* not HPUX and HAVE_LOGB and no logb macro */
-#if defined
(DOMAIN) && defined(SING) && defined
(OVERFLOW)
+#if defined
(DOMAIN) && defined (SING) && defined
(OVERFLOW)
/* If those are defined, then this is probably a `matherr' machine. */
# ifndef HAVE_MATHERR
# define HAVE_MATHERR
/* If those are defined, then this is probably a `matherr' machine. */
# ifndef HAVE_MATHERR
# define HAVE_MATHERR
@@
-282,7
+282,9
@@
DEFUN ("tan", Ftan, Stan, 1, 1, 0,
return make_float (d);
}
return make_float (d);
}
-#if defined HAVE_ISNAN && defined HAVE_COPYSIGN
+#undef isnan
+#define isnan(x) ((x) != (x))
+
DEFUN ("isnan", Fisnan, Sisnan, 1, 1, 0,
doc: /* Return non nil iff argument X is a NaN. */)
(Lisp_Object x)
DEFUN ("isnan", Fisnan, Sisnan, 1, 1, 0,
doc: /* Return non nil iff argument X is a NaN. */)
(Lisp_Object x)
@@
-291,7
+293,8
@@
DEFUN ("isnan", Fisnan, Sisnan, 1, 1, 0,
return isnan (XFLOAT_DATA (x)) ? Qt : Qnil;
}
return isnan (XFLOAT_DATA (x)) ? Qt : Qnil;
}
-DEFUN ("copysign", Fcopysign, Scopysign, 1, 2, 0,
+#ifdef HAVE_COPYSIGN
+DEFUN ("copysign", Fcopysign, Scopysign, 2, 2, 0,
doc: /* Copy sign of X2 to value of X1, and return the result.
Cause an error if X1 or X2 is not a float. */)
(Lisp_Object x1, Lisp_Object x2)
doc: /* Copy sign of X2 to value of X1, and return the result.
Cause an error if X1 or X2 is not a float. */)
(Lisp_Object x1, Lisp_Object x2)
@@
-516,7
+519,7
@@
DEFUN ("expt", Fexpt, Sexpt, 2, 2, 0,
if (f1 == 0.0 && f2 == 0.0)
f1 = 1.0;
#ifdef FLOAT_CHECK_DOMAIN
if (f1 == 0.0 && f2 == 0.0)
f1 = 1.0;
#ifdef FLOAT_CHECK_DOMAIN
- else if ((f1 == 0.0 && f2 < 0.0) || (f1 < 0 && f2 != floor(f2)))
+ else if ((f1 == 0.0 && f2 < 0.0) || (f1 < 0 && f2 != floor
(f2)))
domain_error2 ("expt", arg1, arg2);
#endif
IN_FLOAT2 (f3 = pow (f1, f2), "expt", arg1, arg2);
domain_error2 ("expt", arg1, arg2);
#endif
IN_FLOAT2 (f3 = pow (f1, f2), "expt", arg1, arg2);
@@
-1030,8
+1033,8
@@
syms_of_floatfns (void)
defsubr (&Scos);
defsubr (&Ssin);
defsubr (&Stan);
defsubr (&Scos);
defsubr (&Ssin);
defsubr (&Stan);
-#if defined HAVE_ISNAN && defined HAVE_COPYSIGN
defsubr (&Sisnan);
defsubr (&Sisnan);
+#ifdef HAVE_COPYSIGN
defsubr (&Scopysign);
defsubr (&Sfrexp);
defsubr (&Sldexp);
defsubr (&Scopysign);
defsubr (&Sfrexp);
defsubr (&Sldexp);