Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
cmucl
cmucl
Commits
7069ef9d
Commit
7069ef9d
authored
Dec 14, 2013
by
Raymond Toy
Browse files
Small cleanups.
* Remove unneeded package specifier for %ieee754-rem-pi/2 * Add some comments for %tan.
parent
7190b61c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/code/irrat.lisp
View file @
7069ef9d
...
...
@@ -543,7 +543,7 @@
(
t
;; Argument reduction needed
(
multiple-value-bind
(
n
y0
y1
)
(
kernel::
%ieee754-rem-pi/2
x
)
(
%ieee754-rem-pi/2
x
)
(
case
(
logand
n
3
)
(
0
(
kernel-sin
y0
y1
1
))
...
...
@@ -568,7 +568,7 @@
(
t
;; Argument reduction needed
(
multiple-value-bind
(
n
y0
y1
)
(
kernel::
%ieee754-rem-pi/2
x
)
(
%ieee754-rem-pi/2
x
)
(
ecase
(
logand
n
3
)
(
0
(
kernel-cos
y0
y1
))
...
...
@@ -584,16 +584,19 @@
(
optimize
(
speed
3
)))
(
let
((
ix
(
logand
#x7fffffff
(
kernel:double-float-high-bits
x
))))
(
cond
((
<=
ix
#x3fe921fb
)
;; |x| < pi/4
(
kernel-tan
x
0d0
1
))
((
>=
ix
#x7ff00000
)
;; tan(Inf or Nan) is NaN
(
-
x
x
))
(
t
(
multiple-value-bind
(
n
y0
y1
)
(
kernel::
%ieee754-rem-pi/2
x
)
(
%ieee754-rem-pi/2
x
)
(
let
((
flag
(
-
1
(
ash
(
logand
n
1
)
1
))))
;; flag = 1 if n even, -1 if n odd
(
kernel-tan
y0
y1
flag
)))))))
;; Compute sin and cos of x, simultaneously.
(
defun
%sincos
(
x
)
(
declare
(
double-float
x
)
(
optimize
(
speed
3
)))
...
...
@@ -617,7 +620,6 @@
(
3
(
values
(
-
(
kernel-cos
y0
y1
))
(
kernel-sin
y0
y1
1
))))))))
(
declaim
(
ext:end-block
))
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment