Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
cmucl
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
25
Issues
25
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cmucl
cmucl
Commits
36403a83
Commit
36403a83
authored
Dec 14, 2013
by
Raymond Toy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correct bug in tan.
* code/irrat.lisp * Fix typo in kernel-tan. * tests/trig.lisp * Add test case.
parent
7069ef9d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
src/code/irrat.lisp
src/code/irrat.lisp
+2
-2
src/tests/trig.lisp
src/tests/trig.lisp
+6
-0
No files found.
src/code/irrat.lisp
View file @
36403a83
...
...
@@ -489,11 +489,11 @@
r
))))))))
(
when
(
=
iy
1
)
(
return-from
kernel-tan
w
))
;;
;;
Compute 1/w=1/(x+r) carefully
(
let
((
a
0d0
)
(
tt
0d0
))
(
setf
z
(
kernel:make-double-float
(
kernel:double-float-high-bits
w
)
0
))
(
setf
v
(
-
r
(
-
r
x
)))
; z + v = r + x
(
setf
v
(
-
r
(
-
z
x
)))
; z + v = r + x
(
setf
a
(
/
-1
w
))
(
setf
tt
(
kernel:make-double-float
(
kernel:double-float-high-bits
a
)
0
))
(
setf
s
(
+
1
(
*
tt
z
)))
...
...
src/tests/trig.lisp
View file @
36403a83
...
...
@@ -127,6 +127,12 @@
(
tan
(
float
11/16
1d0
))
8.21141801589894121911423965374711700875371645309d-1
)
(
rt:deftest
tan.6
;; This was found by maxima's testsuite. A bug in kernel-tan when
;; returning cot(x).
(
tan
1.107148717794091d0
)
2.0000000000000028604455051971538975562294147582d0
)
(
rt:deftest
tan.red.0
;; Test for argument reduction with n even
(
tan
(
*
7/4
pi
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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