aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJim Blandy1993-03-11 07:13:24 +0000
committerJim Blandy1993-03-11 07:13:24 +0000
commit340176df06d5d6a274317c25f0d6e56fe8dd6403 (patch)
tree83ceaf54dddf489854468a6629acbb22cd857eb8 /src
parenta90538cbb5cbd3d79d608d5e360055a7279cbdf6 (diff)
downloademacs-340176df06d5d6a274317c25f0d6e56fe8dd6403.tar.gz
emacs-340176df06d5d6a274317c25f0d6e56fe8dd6403.zip
* floatfns.c (Flogb): Undo the change of Feb 22.
Diffstat (limited to 'src')
-rw-r--r--src/floatfns.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/floatfns.c b/src/floatfns.c
index 760b7449387..5ae4379c1be 100644
--- a/src/floatfns.c
+++ b/src/floatfns.c
@@ -615,15 +615,21 @@ DEFUN ("float", Ffloat, Sfloat, 1, 1, 0,
615} 615}
616 616
617DEFUN ("logb", Flogb, Slogb, 1, 1, 0, 617DEFUN ("logb", Flogb, Slogb, 1, 1, 0,
618 "Returns the integer that is the base 2 log of ARG.\n\ 618 "Returns the integer not greater than the base 2 log of the magnitude of ARG.\n\
619This is the same as the exponent of a float.") 619This is the same as the exponent of a float.")
620 (arg) 620 (arg)
621 Lisp_Object arg; 621 Lisp_Object arg;
622{ 622{
623 /* System V apparently doesn't have a `logb' function. It might be 623#ifdef USG
624 better to use it on systems that have it, but Ultrix (at least) 624 error ("SYSV apparently doesn't have a logb function; what to do?");
625 doesn't declare it properly in <math.h>; does anyone really care? */ 625#else
626 return Flog (arg, make_number (2)); 626 Lisp_Object val;
627 double f = extract_float (num);
628
629 IN_FLOAT (val = logb (f), num);
630 XSET (val, Lisp_Int, val);
631 return val;
632#endif
627} 633}
628 634
629/* the rounding functions */ 635/* the rounding functions */