Commit 0c88b8f2 authored by ulrich_y's avatar ulrich_y
Browse files

Used marker for s_r

parent d8e54f73
......@@ -77,7 +77,7 @@ CONTAINS
(product((/(i,i=1,size(a))/))*product((/(i,i=1,size(s))/))), &
size(a) + size(s))
s = [zeroes(m-1),inum(cmplx(42e50),di0)]
s = [zeroes(m-1),marker]
alpha = shuffle_product(a,s)
if(verb >= 50) then
print*, 'mapping to '
......@@ -88,7 +88,7 @@ CONTAINS
if(verb >= 50) print*, 'also mapping to'
do j = 2,size(alpha, 1)
! find location of s_r
n = find_first_true(abs(tocmplx(alpha(j,:)) - 42e50) < zero)
n = find_marker(alpha(j,:))
if(verb >= 50) print*, 'PI with p=',real(p),'i=',n,'g =',&
real([alpha(j,1:n-1),alpha(j,n+1:size(alpha,2)),y2])
res = res - pending_integral(p, n, [alpha(j,1:n-1),alpha(j,n+1:size(alpha,2)),y2])
......
......@@ -12,6 +12,7 @@ MODULE ieps
type(inum), parameter :: izero=inum( 0.,di0)
type(inum), parameter :: imone=inum(-1.,di0)
type(inum), parameter :: ione=inum(+1.,di0)
type(inum), parameter :: marker=inum(0.,5)
interface operator (*)
......
......@@ -66,6 +66,16 @@ CONTAINS
end do
END FUNCTION find_amount_trailing_zeros
FUNCTION find_marker(v) result(res)
type(inum) :: v(:)
integer res
do res=1,size(v)
if(v(res)%i0 == marker%i0) then
return
endif
enddo
END FUNCTION find_marker
FUNCTION find_first_zero(v) result(res)
! returns index of first zero, or -1 if there is no zero
integer :: v(:), i, res
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment