Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
340176df
Commit
340176df
authored
Mar 11, 1993
by
Jim Blandy
Browse files
* floatfns.c (Flogb): Undo the change of Feb 22.
parent
a90538cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
src/floatfns.c
src/floatfns.c
+11
-5
No files found.
src/floatfns.c
View file @
340176df
...
...
@@ -615,15 +615,21 @@ DEFUN ("float", Ffloat, Sfloat, 1, 1, 0,
}
DEFUN
(
"logb"
,
Flogb
,
Slogb
,
1
,
1
,
0
,
"Returns the integer
that is the base 2 log
of ARG.
\n
\
"Returns the integer
not greater than the base 2 log of the magnitude
of ARG.
\n
\
This is the same as the exponent of a float."
)
(
arg
)
Lisp_Object
arg
;
{
/* System V apparently doesn't have a `logb' function. It might be
better to use it on systems that have it, but Ultrix (at least)
doesn't declare it properly in <math.h>; does anyone really care? */
return
Flog
(
arg
,
make_number
(
2
));
#ifdef USG
error
(
"SYSV apparently doesn't have a logb function; what to do?"
);
#else
Lisp_Object
val
;
double
f
=
extract_float
(
num
);
IN_FLOAT
(
val
=
logb
(
f
),
num
);
XSET
(
val
,
Lisp_Int
,
val
);
return
val
;
#endif
}
/* the rounding functions */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment