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
cac87e30
Commit
cac87e30
authored
Aug 06, 2005
by
Thien-Thi Nguyen
Browse files
(Fexpt): Use floats for negative exponent.
parent
3731a850
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
src/ChangeLog
src/ChangeLog
+5
-0
src/floatfns.c
src/floatfns.c
+2
-1
No files found.
src/ChangeLog
View file @
cac87e30
2005-08-06 Thien-Thi Nguyen <ttn@gnu.org>
* floatfns.c (Fexpt): Use floats for negative
exponent (computing a root). Reported by D Goel.
2005-08-02 Richard M. Stallman <rms@gnu.org>
* frame.c (Fframe_char_width): Doc fix.
...
...
src/floatfns.c
View file @
cac87e30
...
...
@@ -460,7 +460,8 @@ DEFUN ("expt", Fexpt, Sexpt, 2, 2, 0,
CHECK_NUMBER_OR_FLOAT
(
arg1
);
CHECK_NUMBER_OR_FLOAT
(
arg2
);
if
(
INTEGERP
(
arg1
)
/* common lisp spec */
&&
INTEGERP
(
arg2
))
/* don't promote, if both are ints */
&&
INTEGERP
(
arg2
)
/* don't promote, if both are ints, and */
&&
0
<=
XINT
(
arg2
))
/* we are not computing the -ARG2 root */
{
/* this can be improved by pre-calculating */
EMACS_INT
acc
,
x
,
y
;
/* some binary powers of x then accumulating */
Lisp_Object
val
;
...
...
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