Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
cmucl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Carl Shapiro
cmucl
Commits
d5d98cb6
Commit
d5d98cb6
authored
34 years ago
by
wlott
Browse files
Options
Downloads
Patches
Plain Diff
Added ext: in front of truly-the. Changed plusp to minusp in
multiply-fixnums so that it will not negate 0.
parent
d7f2ab92
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
code/bignum.lisp
+8
-8
8 additions, 8 deletions
code/bignum.lisp
with
8 additions
and
8 deletions
code/bignum.lisp
+
8
−
8
View file @
d5d98cb6
...
@@ -548,22 +548,22 @@
...
@@ -548,22 +548,22 @@
(
defun
multiply-fixnums
(
a
b
)
(
defun
multiply-fixnums
(
a
b
)
(
declare
(
fixnum
a
b
))
(
declare
(
fixnum
a
b
))
(
let*
((
a-
pl
usp
(
pl
usp
a
))
(
let*
((
a-
min
usp
(
min
usp
a
))
(
b-
pl
usp
(
pl
usp
b
)))
(
b-
min
usp
(
min
usp
b
)))
(
multiple-value-bind
(
high
low
)
(
multiple-value-bind
(
high
low
)
(
%multiply
(
%fixnum-to-digit
(
if
a-
pl
usp
a
(
-
a
)))
(
%multiply
(
%fixnum-to-digit
(
if
a-
min
usp
(
-
a
)
a
))
(
%fixnum-to-digit
(
if
b-
pl
usp
b
(
-
b
))))
(
%fixnum-to-digit
(
if
b-
min
usp
(
-
b
)
b
)))
(
if
(
and
(
zerop
high
)
(
if
(
and
(
zerop
high
)
(
%digit-0-or-plusp
low
))
(
%digit-0-or-plusp
low
))
(
let
((
low
(
truly-the
(
unsigned-byte
31
)
(
let
((
low
(
ext:
truly-the
(
unsigned-byte
31
)
(
%fixnum-digit-with-correct-sign
low
))))
(
%fixnum-digit-with-correct-sign
low
))))
(
if
(
eq
a-
pl
usp
b-
pl
usp
)
(
if
(
eq
a-
min
usp
b-
min
usp
)
low
low
(
-
low
)))
(
-
low
)))
(
let
((
res
(
%allocate-bignum
2
)))
(
let
((
res
(
%allocate-bignum
2
)))
(
%bignum-set
res
0
low
)
(
%bignum-set
res
0
low
)
(
%bignum-set
res
1
high
)
(
%bignum-set
res
1
high
)
(
unless
(
eq
a-
pl
usp
b-
pl
usp
)
(
negate-bignum-in-place
res
))
(
unless
(
eq
a-
min
usp
b-
min
usp
)
(
negate-bignum-in-place
res
))
(
%normalize-bignum
res
2
))))))
(
%normalize-bignum
res
2
))))))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment