Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
H
handyG
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
McMule
handyG
Commits
b5751dad
Commit
b5751dad
authored
Sep 27, 2019
by
ulrich_y
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Consistenly applied f9428a9
parent
63b4cc59
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
3 deletions
+24
-3
src/gpl_module.f90
src/gpl_module.f90
+8
-2
src/ieps.f90
src/ieps.f90
+16
-1
No files found.
src/gpl_module.f90
View file @
b5751dad
...
@@ -398,6 +398,9 @@ CONTAINS
...
@@ -398,6 +398,9 @@ CONTAINS
! ieps, which is what GiNaC does (l. 1013)
! ieps, which is what GiNaC does (l. 1013)
do
j
=
1
,
size
(
z_flat
)
do
j
=
1
,
size
(
z_flat
)
znorm
(
j
)
=
inum
(
z_flat
(
j
)
%
c
/
y
%
c
,
z_flat
(
j
)
%
i0
)
znorm
(
j
)
=
inum
(
z_flat
(
j
)
%
c
/
y
%
c
,
z_flat
(
j
)
%
i0
)
if
(
abs
(
aimag
(
znorm
(
j
)))
>
zero
)
then
znorm
(
j
)
%
i0
=
int
(
sign
(
1._prec
,
aimag
(
znorm
(
j
))),
1
)
endif
enddo
enddo
res
=
G_flat
(
znorm
,
inum
((
1.
,
0.
),
y
%
i0
))
res
=
G_flat
(
znorm
,
inum
((
1.
,
0.
),
y
%
i0
))
return
return
...
@@ -418,6 +421,9 @@ CONTAINS
...
@@ -418,6 +421,9 @@ CONTAINS
! ieps, which is what GiNaC does (l. 1013)
! ieps, which is what GiNaC does (l. 1013)
do
j
=
1
,
size
(
z_flat
)
do
j
=
1
,
size
(
z_flat
)
znorm
(
j
)
=
inum
(
z_flat
(
j
)
%
c
/
y
%
c
,
z_flat
(
j
)
%
i0
)
znorm
(
j
)
=
inum
(
z_flat
(
j
)
%
c
/
y
%
c
,
z_flat
(
j
)
%
i0
)
if
(
abs
(
aimag
(
znorm
(
j
)))
>
zero
)
then
znorm
(
j
)
%
i0
=
int
(
sign
(
1._prec
,
aimag
(
znorm
(
j
))),
1
)
endif
enddo
enddo
res
=
improve_convergence
(
znorm
)
res
=
improve_convergence
(
znorm
)
return
return
...
@@ -443,7 +449,7 @@ CONTAINS
...
@@ -443,7 +449,7 @@ CONTAINS
FUNCTION
G_superflat
(
g
)
result
(
res
)
FUNCTION
G_superflat
(
g
)
result
(
res
)
! simpler notation for flat evaluation
! simpler notation for flat evaluation
complex
(
kind
=
prec
)
::
g
(:),
res
complex
(
kind
=
prec
)
::
g
(:),
res
res
=
G_flat
(
toinum
(
g
(
1
:
size
(
g
)
-1
)),
inum
(
g
(
size
(
g
)),
di0
))
res
=
G_flat
(
toinum
(
g
(
1
:
size
(
g
)
-1
)),
toinum
(
g
(
size
(
g
))
))
END
FUNCTION
G_superflat
END
FUNCTION
G_superflat
FUNCTION
G_real
(
g
)
result
(
res
)
FUNCTION
G_real
(
g
)
result
(
res
)
...
@@ -522,7 +528,7 @@ CONTAINS
...
@@ -522,7 +528,7 @@ CONTAINS
FUNCTION
G_FLATc
(
Z_FLAT
,
Y
)
FUNCTION
G_FLATc
(
Z_FLAT
,
Y
)
complex
(
kind
=
prec
),
intent
(
in
)
::
z_flat
(:),
y
complex
(
kind
=
prec
),
intent
(
in
)
::
z_flat
(:),
y
complex
(
kind
=
prec
)
::
g_flatc
complex
(
kind
=
prec
)
::
g_flatc
g_flatc
=
G_flat
(
toinum
(
z_flat
),
inum
(
y
,
di0
))
g_flatc
=
G_flat
(
toinum
(
z_flat
),
toinum
(
y
))
END
FUNCTION
END
FUNCTION
...
...
src/ieps.f90
View file @
b5751dad
...
@@ -18,7 +18,7 @@ MODULE ieps
...
@@ -18,7 +18,7 @@ MODULE ieps
end
interface
abs
end
interface
abs
interface
toinum
interface
toinum
module
procedure
toinum_cmplx
,
toinum_real
,
toinum_reals
,
toinum_int
module
procedure
toinum_cmplx
s
,
toinum_cmplx
,
toinum_real
,
toinum_reals
,
toinum_int
end
interface
toinum
end
interface
toinum
interface
tocmplx
interface
tocmplx
module
procedure
tocmplxv
,
tocmplxs
module
procedure
tocmplxv
,
tocmplxs
...
@@ -44,6 +44,21 @@ CONTAINS
...
@@ -44,6 +44,21 @@ CONTAINS
absinumv
=
abs
(
n1
%
c
)
absinumv
=
abs
(
n1
%
c
)
END
FUNCTION
ABSINUMV
END
FUNCTION
ABSINUMV
FUNCTION
TOINUM_cmplxs
(
z
,
s
)
complex
(
kind
=
prec
)
::
z
type
(
inum
)
::
toinum_cmplxs
integer
(
1
),
optional
::
s
integer
(
1
)
::
ss
if
(
present
(
s
))
then
ss
=
s
else
ss
=
di0
endif
toinum_cmplxs
=
inum
(
z
,
ss
)
if
(
abs
(
aimag
(
z
))
>
zero
)
then
toinum_cmplxs
%
i0
=
int
(
sign
(
1._prec
,
aimag
(
z
)),
1
)
endif
END
FUNCTION
TOINUM_cmplxs
FUNCTION
TOINUM_cmplx
(
z
,
s
)
FUNCTION
TOINUM_cmplx
(
z
,
s
)
complex
(
kind
=
prec
)
::
z
(:)
complex
(
kind
=
prec
)
::
z
(:)
type
(
inum
)
::
toinum_cmplx
(
size
(
z
))
type
(
inum
)
::
toinum_cmplx
(
size
(
z
))
...
...
ulrich_y
@ulrich_y
·
Oct 01, 2019
Owner
Sorry, this actually refers to
63b4cc59
Sorry, this actually refers to 63b4cc59
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