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
a7688b42
Commit
a7688b42
authored
34 years ago
by
wlott
Browse files
Options
Downloads
Patches
Plain Diff
Added exports for the symbols we want exported. Added vm: in front of
symbols we want from the VM package.
parent
d76a0332
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
code/bignum.lisp
+32
-10
32 additions, 10 deletions
code/bignum.lisp
with
32 additions
and
10 deletions
code/bignum.lisp
+
32
−
10
View file @
a7688b42
...
@@ -11,6 +11,28 @@
...
@@ -11,6 +11,28 @@
;;;
;;;
(
in-package
"BIGNUM"
)
(
in-package
"BIGNUM"
)
(
use-package
"KERNEL"
)
;;; These symbols define the interface to the number code.
(
export
'
(
add-bignums
multiply-bignums
negate-bignum
subtract-bignum
multiply-bignum-and-fixnum
multiply-fixnums
bignum-ashift-right
bignum-ashift-left
bignum-gcd
bignum-to-float
float-bignum-ratio
bignum-integer-length
bignum-logical-and
bignum-logical-ior
bignum-logical-xor
bignum-logical-not
bignum-load-byte
bignum-deposit-byte
bignum-truncate
bignum-plus-p
bignum-compare
make-small-bignum
bignum-logcount
))
;;; These symbols define the interface to the compiler.
(
export
'
(
bignum-type
bignum-element-type
bignum-index
%allocate-bignum
%bignum-length
%bignum-set-length
%bignum-ref
%bignum-set
%digit-0-or-plusp
%add-with-carry
%subtract-with-borrow
%multiply-and-add
%multiply
%lognot
%logand
%logior
%logxor
%fixnum-to-digit
%floor
%fixnum-digit-with-correct-sign
%ashl
%ashr
%digit-logical-shift-right
))
;;;; Notes.
;;;; Notes.
...
@@ -1027,26 +1049,26 @@
...
@@ -1027,26 +1049,26 @@
(
defun
single-float-from-bits
(
bits
exp
plusp
)
(
defun
single-float-from-bits
(
bits
exp
plusp
)
(
declare
(
fixnum
exp
))
(
declare
(
fixnum
exp
))
(
let
((
res
(
dpb
exp
(
let
((
res
(
dpb
exp
single-float-exponent-byte
vm:
single-float-exponent-byte
(
logandc2
(
ext:truly-the
(
unsigned-byte
31
)
(
logandc2
(
ext:truly-the
(
unsigned-byte
31
)
(
%bignum-ref
bits
1
))
(
%bignum-ref
bits
1
))
single-float-hidden-bit
))))
vm:
single-float-hidden-bit
))))
(
make-single-float
(
make-single-float
(
if
plusp
(
if
plusp
res
res
(
logior
res
(
ash
-1
float-sign-shift
))))))
(
logior
res
(
ash
-1
vm:
float-sign-shift
))))))
;;;
;;;
(
defun
double-float-from-bits
(
bits
exp
plusp
)
(
defun
double-float-from-bits
(
bits
exp
plusp
)
(
declare
(
fixnum
exp
))
(
declare
(
fixnum
exp
))
(
let
((
hi
(
dpb
exp
(
let
((
hi
(
dpb
exp
double-float-exponent-byte
vm:
double-float-exponent-byte
(
logandc2
(
ext:truly-the
(
unsigned-byte
31
)
(
logandc2
(
ext:truly-the
(
unsigned-byte
31
)
(
%bignum-ref
bits
2
))
(
%bignum-ref
bits
2
))
double-float-hidden-bit
))))
vm:
double-float-hidden-bit
))))
(
make-double-float
(
make-double-float
(
if
plusp
(
if
plusp
hi
hi
(
logior
hi
(
ash
-1
float-sign-shift
)))
(
logior
hi
(
ash
-1
vm:
float-sign-shift
)))
(
%bignum-ref
bits
1
))))
(
%bignum-ref
bits
1
))))
...
@@ -1079,14 +1101,14 @@
...
@@ -1079,14 +1101,14 @@
(
single-float
(
single-float
(
single-float-from-bits
(
single-float-from-bits
bits
bits
(
check-exponent
len
single-float-bias
(
check-exponent
len
vm:
single-float-bias
single-float-normal-exponent-max
)
vm:
single-float-normal-exponent-max
)
plusp
))
plusp
))
(
double-float
(
double-float
(
double-float-from-bits
(
double-float-from-bits
bits
bits
(
check-exponent
len
double-float-bias
(
check-exponent
len
vm:
double-float-bias
double-float-normal-exponent-max
)
vm:
double-float-normal-exponent-max
)
plusp
))))
plusp
))))
(
check-exponent
(
exp
bias
max
)
(
check-exponent
(
exp
bias
max
)
(
let
((
exp
(
+
exp
bias
)))
(
let
((
exp
(
+
exp
bias
)))
...
...
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