Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
H
handyG
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
McMuLe
handyG
Commits
af47d01a
Commit
af47d01a
authored
Oct 08, 2019
by
Yannick Ulrich
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-improve-polylog'
parents
b36dce4d
d303027f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
11 deletions
+31
-11
README.md
README.md
+10
-2
test.f90
checks/test.f90
+8
-0
globals.f90
src/globals.f90
+4
-5
maths_functions.f90
src/maths_functions.f90
+9
-4
No files found.
README.md
View file @
af47d01a
...
...
@@ -78,9 +78,17 @@ The compilation process creates the following results
difference between two successive terms at which the series
expansion (6) is truncated.
*
`integer LiInf = 1000`
*
`real(kind=prec) :: Lidel = 1e-15`
difference $`|\delta_i|`$ between two successive terms at which the
series expansion for
```math
{\rm Li}_n(x) = \sum_{i=1}^\infty \frac{x^i}{i^n}
= \sum_{i=1}^\infty \delta_i
```
is truncated.
number of terms in the expansion of classical polylogarithms.
*
`real(kind=prec) :: hCircle = 1.1`
...
...
checks/test.f90
View file @
af47d01a
...
...
@@ -456,6 +456,14 @@ CONTAINS
call
test_one_flat
(
(/
(
0._prec
,
0.
),
(
1._prec
,
0.
),
(
0.1_prec
,
-0.1_prec
),
(
-1.3_prec
,
10.2_prec
),
(
0.4_prec
,
0._prec
)
/)
,
ref
,
'F.19'
)
ref
=
(
0.6492441149301267712849185177612894261440132_prec
,
2.76692869057070821067245201199781913943_prec
)
call
iprint
(
' testing GPL G.1 ...'
,
-1
)
res
=
G
([
toinum
(
(
-1641._prec
,
4682._prec
)/
5000.
),&
toinum
(
(
-1187._prec
,
4827._prec
)/
5000.
),&
toinum
(
1069._prec
/
5000.
,
+1_1
),
toinum
(
787._prec
/
5000.
,
-1_1
)],
toinum
(
1._prec
)
)
call
check
(
res
,
ref
,
ttol
=
5.e-9_prec
)
end
subroutine
do_GPL_tests
...
...
src/globals.f90
View file @
af47d01a
...
...
@@ -16,7 +16,7 @@ MODULE globals
! The following parameters control the accuracy of the evaluation
real
(
kind
=
prec
),
protected
::
MPLdelta
=
zero
! if the MPL sum changes less then del it is truncated.
integer
,
protected
::
PolylogInfinity
=
1000
! expansion order for P
olylogs
real
(
kind
=
prec
),
protected
::
Lidelta
=
zero
! like MPLdelta but for p
olylogs
real
(
kind
=
prec
),
protected
::
HoelderCircle
=
1.1_prec
! when to apply Hoelder convolution?
integer
,
parameter
::
PolyLogCacheSize
(
2
)
=
(/
5
,
100
/)
! = (/ mmax, n /). At most n polylogs with weight mmax will be cached
...
...
@@ -46,11 +46,10 @@ CONTAINS
END
SUBROUTINE
parse_cmd_args
#endif
SUBROUTINE
SET_OPTIONS
(
mpldel
,
liinf
,
hcircle
)
real
(
kind
=
prec
),
optional
::
hcircle
,
mpldel
integer
,
optional
::
liinf
SUBROUTINE
SET_OPTIONS
(
mpldel
,
lidel
,
hcircle
)
real
(
kind
=
prec
),
optional
::
hcircle
,
mpldel
,
lidel
if
(
present
(
MPLdel
))
MPLdelta
=
mpldel
if
(
present
(
liinf
))
PolyLogInfinity
=
liinf
if
(
present
(
Lidel
))
LiDelta
=
lidel
if
(
present
(
hcircle
))
HoelderCircle
=
hcircle
END
SUBROUTINE
...
...
src/maths_functions.f90
View file @
af47d01a
...
...
@@ -31,14 +31,19 @@ CONTAINS
FUNCTION
naive_polylog
(
m
,
x
)
result
(
res
)
! Computes the classical polylogarithm Li_m(x) using series representation up to order n
integer
::
m
complex
(
kind
=
prec
)
::
x
,
res
complex
(
kind
=
prec
)
::
x
,
res
,
del
integer
(
kind
=
ikin
)
::
i
res
=
0._prec
do
i
=
1
,
PolylogInfinity
i
=
1
del
=
1._prec
do
while
(
abs
(
del
)
>
zero
)
if
(
i
**
m
.lt.
0
)
return
! roll over
if
(
abs
(
x
**
i
)
.lt.
1.e-250_prec
)
return
res
=
res
+
x
**
i
/
i
**
m
enddo
del
=
x
**
i
/
i
**
m
res
=
res
+
del
i
=
i
+1
end
do
END
FUNCTION
naive_polylog
FUNCTION
Li2
(
x
)
...
...
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