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
3552f0f8
Commit
3552f0f8
authored
27 years ago
by
dtc
Browse files
Options
Downloads
Patches
Plain Diff
Restrict the expt->%pow transform to arguments that produce real
results.
parent
918ab253
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
compiler/float-tran.lisp
+21
-11
21 additions, 11 deletions
compiler/float-tran.lisp
with
21 additions
and
11 deletions
compiler/float-tran.lisp
+
21
−
11
View file @
3552f0f8
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain.
;;; Carnegie Mellon University, and has been placed in the public domain.
;;;
;;;
(
ext:file-comment
(
ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/float-tran.lisp,v 1.3
7
1997/
09/20 11:51:08
dtc Exp $"
)
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/float-tran.lisp,v 1.3
8
1997/
10/08 19:41:16
dtc Exp $"
)
;;;
;;;
;;; **********************************************************************
;;; **********************************************************************
;;;
;;;
...
@@ -461,16 +461,26 @@
...
@@ -461,16 +461,26 @@
`
(
,
prim
x
)))
`
(
,
prim
x
)))
`
(
,
prim
x
)))))
`
(
,
prim
x
)))))
(
dolist
(
stuff
'
((
expt
%pow
t
)
(
deftransform
atan
((
x
y
)
(
single-float
single-float
)
*
)
(
atan
%atan2
t
)))
`
(
coerce
(
%atan2
(
coerce
x
'double-float
)
(
coerce
y
'double-float
))
(
destructuring-bind
(
name
prim
rtype
)
stuff
'single-float
))
(
deftransform
name
((
x
y
)
'
(
single-float
single-float
)
rtype
:eval-name
t
)
(
deftransform
atan
((
x
y
)
(
double-float
double-float
)
*
:when
:both
)
`
(
coerce
(
,
prim
(
coerce
x
'double-float
)
`
(
%atan2
x
y
))
(
coerce
y
'double-float
))
'single-float
))
(
deftransform
expt
((
x
y
)
((
single-float
0f0
)
single-float
)
*
)
(
deftransform
name
((
x
y
)
'
(
double-float
double-float
)
"convert to inline float expt"
rtype
:eval-name
t
:when
:both
)
`
(
coerce
(
%pow
(
coerce
x
'double-float
)
(
coerce
y
'double-float
))
`
(
,
prim
x
y
))))
'single-float
))
(
deftransform
expt
((
x
y
)
((
double-float
0d0
)
double-float
)
*
:when
:both
)
"convert to inline float expt"
`
(
%pow
x
y
))
(
deftransform
expt
((
x
y
)
((
single-float
0f0
)
(
signed-byte
32
))
*
)
"convert to inline float expt"
`
(
coerce
(
%pow
(
coerce
x
'double-float
)
(
coerce
y
'double-float
))
'single-float
))
(
deftransform
expt
((
x
y
)
((
double-float
0d0
)
(
signed-byte
32
))
*
:when
:both
)
"convert to inline float expt"
`
(
%pow
x
(
coerce
y
'double-float
)))
;;; ANSI says log with base zero returns zero.
;;; ANSI says log with base zero returns zero.
(
deftransform
log
((
x
y
)
(
float
float
)
float
)
(
deftransform
log
((
x
y
)
(
float
float
)
float
)
...
...
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