[UP]


Manual Reference Pages  - 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


f2c (3) October 17, 2020
Generated by manServer 1.08 from c35297ff-86cf-4a76-9d7f-93da19e5f7dd using man macros.