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
671a9a2c
Commit
671a9a2c
authored
Aug 28, 2019
by
ulrich_y
Browse files
Made branch cuts in plog1 more precise
parent
ef6e73d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
src/maths_functions.f90
src/maths_functions.f90
+13
-2
No files found.
src/maths_functions.f90
View file @
671a9a2c
...
...
@@ -459,8 +459,19 @@ CONTAINS
implicit
none
type
(
inum
)
::
a
,
b
complex
(
kind
=
prec
)
plog1
!TODO!!
plog1
=
log
(
1.
-
a
%
c
/
b
%
c
)
if
(
(
abs
(
aimag
(
a
))
.lt.
zero
)
.and.
(
abs
(
aimag
(
b
))
.lt.
zero
)
)
then
! Both arguments are real, only here does the ieps matter
plog1
=
log
(
abs
(
1.
-
a
%
c
/
b
%
c
))
! this does not depend on the sign of a
if
(
real
(
a
)
.gt.
real
(
b
)
.and.
real
(
b
)
.gt.
0
)
then
plog1
=
plog1
+
b
%
i0
*
i_
*
pi
elseif
(
real
(
a
)
.lt.
real
(
b
)
.and.
real
(
b
)
.lt.
0
)
then
plog1
=
plog1
-
b
%
i0
*
i_
*
pi
endif
else
plog1
=
log
(
1.
-
a
%
c
/
b
%
c
)
endif
END
FUNCTION
#ifndef NOCACHE
...
...
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