! Fortran implementation of the de Vries iterative algorithm for
! the Fine Structure Constant
!
! Copyright (C) 2014 J Hirsch
!
! Licensed under the GPLv3+ (GNU General Public License v3+)
! http://www.gnu.org/licenses/gpl-3.0.html
!
! 6 Apr 2014 - Notes from Luke Kenneth Casson Leighton <lkcl@lkcl.net>
!
! 1) code must be executed with sufficient floating precision, iterations
!    and terms.  then AND ONLY then does it match the 2010 CODATA
!    value of alpha to within the uncertainty of the 2010 CODATA value:
!    http://physics.nist.gov/cgi-bin/cuu/Value?alph
!
! 2) it may be compiled for example with GNU Fortran http://gcc.gnu.org/fortran
!    with the command "gfortran alpha.f -o alpha" then executed with "./alpha"
!
! 3) for more information see http://lkcl.net/reports/fine_structure_constant
!

      implicit real*16 (a-h,o-z)
      pi=2.D0*asin(1.D0)
      write (*,*) 'enter initial a (e.g.0.1)'
      read (*,*) a
      do i=0,30
      ainv=1./a
      write (*,*) i, a, ainv
      gam=0.D0
      n=0
      do j=0,30
      gam=gam+a**j/(2.*pi)**n
      n=n+j
      end do
      a=gam**2*exp(-pi**2/2.)
      end do
      stop
      end
