Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
oct
/
oct
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
bba9f894
authored
20120411 08:47:28 0700
by
Raymond Toy
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Update accuracy for oct.ellipticpi.n2.d and add new test that
caused oct.ellipticpi.n2.d to fail.
1 parent
104efdea
Hide whitespace changes
Inline
Sidebyside
Showing
1 changed file
with
17 additions
and
2 deletions
rttests.lisp
rttests.lisp
View file @
bba9f89
...
...
@@ 1114,13 +1114,28 @@
for
epi
=
(
ellipticpi
n
phi
0
)
for
true
=
(
/
(
atanh
(
*
(
tan
phi
)
(
sqrt
(

n
1
))))
(
sqrt
(

n
1
)))
for
result
=
(
checkaccuracy
4
7
epi
true
)
for
result
=
(
checkaccuracy
4
5.85
epi
true
)
;; Not sure if this formula holds when atanh gives a complex
;; result. Wolfram doesn't say
when
(
and
(
not
(
complexp
true
))
result
)
append
(
list
(
list
(
list
k
n
phi
)
result
)))
nil
)
;; Failed test case:
;; ((89 66.68551748022054d0 0.12266024127708153d0)
;; (45.868614757480834d0 47 0.47787458521306514d0
;; 0.4778745852130726d0))
;; New threshold is 45.85 bits.
(
rt:deftest
oct.ellipticpi.n2.d1
(
let*
((
n
66.68551748022054d0
)
(
phi
0.12266024127708153d0
)
(
epi
(
ellipticpi
n
phi
0
))
(
true
(
/
(
atanh
(
*
(
tan
phi
)
(
sqrt
(

n
1
))))
(
sqrt
(

n
1
)))))
(
checkaccuracy
45.8686d0
epi
true
))
nil
)
(
rt:deftest
oct.ellipticpi.n0.q
;; Tests for random values for phi in [0, pi/2] and n in [0, 1]
(
loop
for
k
from
0
below
100
...
...
@@ 1241,7 +1256,7 @@
;; zero because valueortiny was too tiny.
(
let
((
g
(
cfincompletegamma
3d0
5d0
))
(
true
(

2
(
*
37
(
exp
5d0
)))))
(
checkaccuracy
5
3
g
true
))
(
checkaccuracy
5
1.2
g
true
))
nil
)
(
rt:deftest
gamma.1.d
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment