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
8e0c67d0
Commit
8e0c67d0
authored
10 years ago
by
Raymond Toy
Browse files
Options
Downloads
Patches
Plain Diff
Return -infinity for %log2 and %log10 of +0.
parent
4d3255aa
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
src/code/irrat-dd.lisp
+6
-0
6 additions, 0 deletions
src/code/irrat-dd.lisp
with
6 additions
and
0 deletions
src/code/irrat-dd.lisp
+
6
−
0
View file @
8e0c67d0
...
@@ -1379,6 +1379,9 @@ pi/4 11001001000011111101101010100010001000010110100011000 010001101001100010
...
@@ -1379,6 +1379,9 @@ pi/4 11001001000011111101101010100010001000010110100011000 010001101001100010
(
declare
(
type
double-double-float
x
)
(
declare
(
type
double-double-float
x
)
(
optimize
(
speed
3
)
(
space
0
)
(
optimize
(
speed
3
)
(
space
0
)
(
inhibit-warnings
3
)))
(
inhibit-warnings
3
)))
(
when
(
eql
x
0w0
)
;; log2(+0) = -infinity
(
return-from
dd-%log2
(
/
-1
x
)))
(
multiple-value-bind
(
e
x
y
z
)
(
multiple-value-bind
(
e
x
y
z
)
(
compute-log
x
)
(
compute-log
x
)
;; Multiply log of fraction by log2(e) and base 2 exponent by 1
;; Multiply log of fraction by log2(e) and base 2 exponent by 1
...
@@ -1395,6 +1398,9 @@ pi/4 11001001000011111101101010100010001000010110100011000 010001101001100010
...
@@ -1395,6 +1398,9 @@ pi/4 11001001000011111101101010100010001000010110100011000 010001101001100010
(
declare
(
type
double-double-float
x
)
(
declare
(
type
double-double-float
x
)
(
optimize
(
speed
3
)
(
space
0
)
(
optimize
(
speed
3
)
(
space
0
)
(
inhibit-warnings
3
)))
(
inhibit-warnings
3
)))
(
when
(
eql
x
0w0
)
;; log2(+0) = -infinity
(
return-from
dd-%log10
(
/
-1
x
)))
(
multiple-value-bind
(
e
x
y
z
)
(
multiple-value-bind
(
e
x
y
z
)
(
compute-log
x
)
(
compute-log
x
)
;; Multiply log of fraction by log10(e) and base 2 exponent by log10(2).
;; Multiply log of fraction by log10(e) and base 2 exponent by log10(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