22 July 2026
Feast of Saint Mary Magdalene (1st century AD)
3020. 1. FORTRAN Code to calculate Transcendental Constants from π up to the constant number 366; QUAD PRECISION
program transcendental_II_UP
! Program transcendentalconstants II
IMPLICIT NONE
REAL*16 rHS,rHSi,pi_VAL,e_VAL,HS,HT,HTF,HTS
REAL*16 InverseTransCnstnext
REAL*16 TransCnstnext
REAL*16 y, counter
integer*8 i
pi_VAL=3.1415926535897932384626433832795028841971693993751058Q+00
e_VAL=2.71828182845904523536028747135266249775724709369995957Q+00
! pi_VAL = pi
! e_VAL = e
rHS= (pi_VAL / e_VAL)
rHSi=(e_VAL / pi_VAL)
! real (kind=3) x,y,z,rHS,rHSi,pi,e,TransCnst,HS,HT,HTF,HTS
! real (kind=3) InverseTransCnstnext
! real (kind=3) TransCnstnext, rHStemp, counter
! integer*8 i,k,m
! parameter (pi=0.314159265358979323846D+01)
! parameter (e=0.271828182845904523536D+01)
! parameter (rHS= (pi / e))
! parameter (rHSi=0.271828182845904523536D+01/0.31415926535897932384&
! &6D+01)
! parameter (HS=0.314159265358979323846D+02/0.271828182845904523536D&
! &+01)
! parameter (HT=(pi*e*HS)/1.00000000000000000000D+002)
! parameter (HTF=(pi*pi)/1.0000000000000000000D+001)
! parameter (HTS=(e*HS)*(e*HS)/1.00000000000000000000D+003)
open(11,file='C:/FORTRAN/Constants UP INTEL STUDIO.txt')
WRITE(11,*)'VALUE OF PI ='
WRITE(11,200) pi_VAL
WRITE(11,*)' '
WRITE(11,*)'VALUE OF E ='
WRITE(11,200) e_VAL
WRITE(11,*)' '
WRITE(11,*)'VALUE OF PI / E ='
WRITE(11,200) rHS
WRITE(11,*)' '
WRITE(11,*)'VALUE OF e / pi ='
WRITE(11,200) rHSi
WRITE(11,*)' '
! print *, ' Constants up'
write(11,*) ' Transcendental Constants up'
! print *, ' '
write(11,*) ' '
! print *, ' Index value of CONST'
write(11,*) ' Index Value of CONSTANT'
! print *, ' '
write(11,*) ' '
counter = 0.0Q000
i = 8
counter = 1.0Q0
if ( counter .eq. 1.0Q0 ) then
TransCnstnext = (pi_VAL)
InverseTransCnstnext = (1.00Q+000/( (pi_VAL)))
! print *,'C equals Constant',i, ' = ', TransCnstnext
write(11,100)i, TransCnstnext
endif
counter = 0.0Q000
do 10 i = 9, 366
counter = counter + 1.0Q0
y = (counter)
TransCnstnext = (pi_VAL) * ((rHS)**(y))
InverseTransCnstnext = (1.0000000000000000000Q+000/TransCnstnext)
! print *,'C equals Constant',i, ' = ', TransCnstnextt
write(11,100)i, TransCnstnext
if ( i .eq. 16) then
! print *, ' '
write(11,*) ' '
endif
if ( i .eq. 31) then
! print *, ' '
write(11,*) ' '
endif
if ( i .eq. 47) then
! print *, ' '
write(11,*) ' '
endif
if ( i .eq. 63) then
! print *, ' '
write(11,*) ' '
endif
if ( i .eq. 79) then
! print *, ' '
write(11,*) ' '
endif
if ( i .eq. 95) then
! print *, ' '
write(11,*) ' '
endif
if ( i .eq. 111) then
! print *, ' '
write(11,*) ' '
endif
if ( i .eq. 127) then
! print *, ' '
write(11,*) ' '
endif
if ( i .eq. 143) then
! print *, ' '
write(11,*) ' '
endif
if ( i .eq. 159) then
! print *, ' '
write(11,*) ' '
endif
if ( i .eq. 175) then
! print *, ' '
write(11,*) ' '
endif
if ( i .eq. 191) then
! print *, ' '
write(11,*) ' '
endif
if ( i .eq. 207) then
! print *, ' '
write(11,*) ' '
endif
if ( i .eq. 223) then
! print *, ' '
write(11,*) ' '
endif
if ( i .eq. 239) then
! print *, ' '
write(11,*) ' '
endif
if ( i .eq. 255) then
! print *, ' '
write(11,*) ' '
endif
if ( i .eq. 271) then
! print *, ' '
write(11,*) ' '
endif
if ( i .eq. 287) then
! print *, ' '
write(11,*) ' '
endif
if ( i .eq. 303) then
! print *, ' '
write(11,*) ' '
endif
if ( i .eq. 319) then
! print *, ' '
write(11,*) ' '
endif
if ( i .eq. 335) then
! print *, ' '
write(11,*) ' '
endif
if ( i .eq. 351) then
! print *, ' '
write(11,*) ' '
endif
10 continue
close(11)
pause
stop
100 format(I5,E60.50)
200 format(E60.50)
! end program transcendentalconstants II
end program transcendental_II_UP

Comments powered by CComment