diff --git a/gpl_module.f90 b/gpl_module.f90 index f959bae279fce795fe5c3d0a2aafdab05d9b3d73..4f5d0cc64cb746d803eff93451d5bad50630383a 100644 --- a/gpl_module.f90 +++ b/gpl_module.f90 @@ -7,12 +7,6 @@ MODULE gpl_module CONTAINS - RECURSIVE FUNCTION factorial(n) result(res) - integer, intent(in) :: n - integer :: res - res = merge(1,n*factorial(n-1),n==0) - END FUNCTION factorial - FUNCTION zeta(n) real(kind=prec) :: values(9), zeta integer :: n @@ -58,7 +52,6 @@ CONTAINS if(abs(z(i)) < zero) cycle ! skip zero values if(abs(y) > abs(z(i))) is_convergent = .false. end do - END FUNCTION is_convergent RECURSIVE FUNCTION G_flat(z_flat,y) result(res) diff --git a/random/shuffle_algebra.f90 b/other_stuff/shuffle_algebra.f90 similarity index 92% rename from random/shuffle_algebra.f90 rename to other_stuff/shuffle_algebra.f90 index 42962a00b5dd2a2dc9e6dfb80cc130d5de0d3fe0..1b2190f3842cc44f6933ec419ffcf047f8dfc3f6 100644 --- a/random/shuffle_algebra.f90 +++ b/other_stuff/shuffle_algebra.f90 @@ -1,6 +1,9 @@ -! This is currently a stand alone program which will merely be used as a -! guide for the implementation of the shuffle algebra for GPL functions +! An implementation of the shuffle algebra +! in accordance with 1904.07279v1, polylogs for the masses, p.7-8 + +! This implementation defines words as strings of characters and shuffles them +! into sums of words. PROGRAM shuffle_algebra implicit none diff --git a/shuffle.f90 b/shuffle.f90 index ca61c9f05e8450dafe4f776c8616b5519b4bdaa5..4aebce9df623aa7ea3f271fb5495b5fde678f929 100644 --- a/shuffle.f90 +++ b/shuffle.f90 @@ -60,18 +60,18 @@ CONTAINS END MODULE shuffle -PROGRAM test - use utils - use shuffle - implicit none +! PROGRAM test +! use utils +! use shuffle +! implicit none - complex(kind=prec) :: v1(3), v2(2) - integer :: amount_shuffles +! complex(kind=prec) :: v1(3), v2(2) +! integer :: amount_shuffles - v1 = cmplx((/1,2,3/)) - v2 = cmplx((/4,5/)) +! v1 = cmplx((/1,2,3/)) +! v2 = cmplx((/4,5/)) - call print_matrix(shuffle_product(v1,v2)) +! call print_matrix(shuffle_product(v1,v2)) -END PROGRAM test +! END PROGRAM test diff --git a/test.f90 b/test.f90 index e9515edb80d7c2e10eea97fa3a88b924e4fd3a64..7d8010809b6a4ba2eaccecf42a700fa7ad791cd2 100644 --- a/test.f90 +++ b/test.f90 @@ -102,8 +102,8 @@ CONTAINS end subroutine do_GPL_tests subroutine do_shuffle_tests() - integer :: v(3) = (/1,2,3/) - integer :: w(2) = (/-1,-2/) + complex(kind=prec) :: v(3) = cmplx((/1,2/)) + complex(kind=prec) :: w(2) = cmplx((/3,4/)) call print_matrix(shuffle_product(v,w)) end subroutine do_shuffle_tests diff --git a/utils.f90 b/utils.f90 index 96eb8c6ee8fc844cff1a8f3fc7304a329d1c3ea6..1e028186ca8cc9a549d8cc1d640492156d0a4e73 100644 --- a/utils.f90 +++ b/utils.f90 @@ -87,7 +87,7 @@ CONTAINS complex(kind=prec) :: res(n) res = 0 END FUNCTION zero_array - + RECURSIVE FUNCTION factorial(n) result(res) integer, intent(in) :: n integer :: res @@ -137,6 +137,7 @@ END MODULE utils ! PROGRAM test +! use globals ! use utils ! implicit none