      program equi ! BB Jun 06 2017. Equivalence principle.
      implicit real*8 (a-h,o-z)
      parameter(iuo=6,iud=8,ngnu=1000)
      parameter(xmax=10.d00)
      taumax=log(xmax)
      dtau=taumax/ngnu
      write(iuo,'(/," equi.f: Equivalence principle.")')
      write(iuo,'(9x,"Constant gravitational field,")')
      write(iuo,'(9x,"linearly increasing potential.",/)')
c
      write(iuo,'(8x," 1. gnuplot equiR.plt, equiRrat.plt (Rindler).")')
      open(iud,file="equiR.d",form='formatted',status='unknown')
      do i=0,ngnu
        tau=i*dtau
        t=sinh(tau)
        x=cosh(tau)-1
        rat1=t/tau   ! SR ratio from uniform acceleration.
        rat2=exp(x)  ! GR ratio using Rindler's energy conservation.
        write(iud,'(5g14.6)') tau,t,x,rat1,rat2
      enddo
      close(iud)
c
      write(iuo,'(8x," 2. gnuplot equiBrat.plt (Berg).",/)')
      open(iud,file="equiB.d",form='formatted',status='unknown')
      do i=0,ngnu
        tau=i*dtau
        t=sinh(tau)
        x=cosh(tau)-1
        rat1=t/tau
        rat3=1.d0+x ! GR ratio using my energy conservation.
        write(iud,'(5g14.6)') tau,t,x,rat1,rat3
      enddo
      close(iud)
c
      stop "equi: all done."
      end
