f2c(3f) - [M_units:TEMPERATURE] convert Fahrenheit to Celsius (LICENSE:PD)
Synopsis
Description
Options
Example
Author
License
elemental real function f2c(fahrenheit)
class(*),intent(in) :: fahrenheit
Converts Fahrenheit temperatures to Celsius using the formula:
celsius=(fahrenheit+40.0)*5.0/9.0 - 40.0
fahrenheit any standard scalar value supported by anyscalar_to_real(3f).
Sample program
program demo_f2c use M_units, only : f2c implicit none write(*,*)With REAL array input , f2c([ -40.0,32.0, 212.0 ]) write(*,*)With INTEGER array input , f2c([ -40, 32, 212 ]) write(*,*)With DOUBLEPRECISION , f2c(-40.0d0),f2c(32.0d0),f2c(212.0d0) end program demo_f2cResults
With REAL array input -40.0000000 0.00000000 100.000000 With INTEGER array input -40.0000000 0.00000000 100.000000 With DOUBLEPRECISION -40.0000000 0.00000000 100.000000
John S. Urban
Public Domain
Nemo Release 3.1 | f2c (3) | February 23, 2025 |