Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
c26406fe
Commit
c26406fe
authored
Mar 15, 1993
by
Jim Blandy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* floatfns.c (logb): Add extern declaration for this.
* floatfns.c (Flogb): Under SYSV, implement this using frexp.
parent
6758394b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
src/floatfns.c
src/floatfns.c
+13
-4
No files found.
src/floatfns.c
View file @
c26406fe
...
...
@@ -55,6 +55,9 @@ Lisp_Object Qarith_error;
#include <math.h>
/* These declarations are omitted on some systems, like Ultrix. */
extern
double
logb
();
#if defined(DOMAIN) && defined(SING) && defined(OVERFLOW)
/* If those are defined, then this is probably a `matherr' machine. */
# ifndef HAVE_MATHERR
...
...
@@ -620,17 +623,23 @@ This is the same as the exponent of a float.")
(
arg
)
Lisp_Object
arg
;
{
#ifdef USG
error
(
"SYSV apparently doesn't have a logb function; what to do?"
);
#else
Lisp_Object
val
;
int
value
;
double
f
=
extract_float
(
arg
);
#ifdef USG
{
int
exp
;
IN_FLOAT
(
frexp
(
f
,
&
exp
),
"logb"
,
arg
);
XSET
(
val
,
Lisp_Int
,
exp
-
1
);
}
#else
IN_FLOAT
(
value
=
logb
(
f
),
"logb"
,
arg
);
XSET
(
val
,
Lisp_Int
,
value
);
return
val
;
#endif
return
val
;
}
/* 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