Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
McMule
handyG
Commits
a82c1e91
Commit
a82c1e91
authored
Jul 09, 2019
by
ulrich_y
Browse files
Added overflow control to naive_polylog
parent
5919f09d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
src/gpl_module.f90
src/gpl_module.f90
+2
-2
src/maths_functions.f90
src/maths_functions.f90
+6
-3
No files found.
src/gpl_module.f90
View file @
a82c1e91
...
...
@@ -67,7 +67,7 @@ CONTAINS
if
(
.not.
present
(
y
))
print
*
,
'G('
,
abs
(
z_flat
),
')'
END
SUBROUTINE
print_G
FUNCTION
remove_sr_from_last_place_in_PI
(
a
,
y2
,
m
,
p
)
result
(
res
)
RECURSIVE
FUNCTION
remove_sr_from_last_place_in_PI
(
a
,
y2
,
m
,
p
)
result
(
res
)
! here what is passed is not the full a vector, only a1, ..., ak without the trailing zeroes
integer
::
m
,
i
,
j
,
n
complex
(
kind
=
prec
)
::
a
(:),
y2
,
s
(
m
),
p
(:),
res
...
...
@@ -127,7 +127,7 @@ CONTAINS
return
end
if
a
=
g
(
1
:
size
(
p
)
-1
)
a
=
g
(
1
:
size
(
g
)
-1
)
y2
=
g
(
size
(
g
))
m
=
size
(
g
)
! actually, size(g)-1+1
...
...
src/maths_functions.f90
View file @
a82c1e91
...
...
@@ -11,10 +11,13 @@ CONTAINS
integer
::
m
complex
(
kind
=
prec
)
::
x
,
res
integer
::
i
,
n
integer
,
allocatable
::
j
(:)
n
=
1000
j
=
(/(
i
,
i
=
1
,
n
,
1
)/)
res
=
sum
(
x
**
j
/
j
**
m
)
res
=
0.
do
i
=
1
,
n
if
(
i
**
m
.lt.
0
)
return
! roll over
if
(
abs
(
x
**
i
)
.lt.
1.e-250
)
return
res
=
res
+
x
**
i
/
i
**
m
enddo
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