C Library Functions - f2c (3)
NAME
f2c(3f) - [M_units:TEMPERATURE] convert Fahrenheit to Celsius
(LICENSE:PD)
CONTENTS
Synopsis
Description
Options
Example
Author
License
SYNOPSIS
elemental real function f2c(fahrenheit)
class(*),intent(in) :: fahrenheit
DESCRIPTION
Converts Fahrenheit temperatures to Celsius using the formula:
celsius=(fahrenheit+40.0)*5.0/9.0 - 40.0
OPTIONS
|
fahrenheit |
| |
any standard scalar value supported by anyscalar_to_real(3f).
|
|
EXAMPLE
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_f2c
Results
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
AUTHOR
John S. Urban
LICENSE
Public Domain
| Nemo Release 3.1 | f2c (3) | June 29, 2025 |
Generated by manServer 1.08 from 7adef712-c8ff-4d41-80fa-9c6de4987a14 using man macros.