Re: rest energy and dp



program tub32
implicit none

integer, parameter :: dp=kind(1.0d0)
real(kind=dp):: grams_per_gallon, bins, ergs, gallons_per_bin, subtotal
real(kind=dp):: ergs_per_gram, gram_to_ergs , ten_to_the_five

bins = 55.0_dp
!units: 1 bin = .25 gallons
gallons_per_bin = .25_dp

!units: grams per gallon
grams_per_gallon = 946.34110134025_dp

!units: 1 gram = 9 e 20 ergs
gram_to_ergs = 9.0
ten_to_the_five=100000.0
ergs_per_gram=gram_to_ergs * ten_to_the_five**4.0


! the figgerin'
subtotal = bins * gallons_per_bin * grams_per_gallon
ergs = subtotal* ergs_per_gram
!units 1 gallon = 3145 grams
! (*,*)
write (*, '(A , F12.8)') "bins= ", bins
write (*, '(A , F12.8)') "gallons_per_bin= ", gallons_per_bin
write (*, '(A , F12.8)') "grams_per_gallon= " , grams_per_gallon
write (*, '(A , F20.8)') " subtotal= ", subtotal
write (*, '(A , F40.8)') "ergs_per_gram= " , ergs_per_gram

write (*, '(A , F40.8)') "ergs= " ,ergs

write (*, '(A )') " 12345678911234567892123456. "


end program tub32


--
wade ward
"The final irony is that cops
and rodney king have the same IQ."


.