Module Math_Constants_Module ! This file: ! http://ftp.aset.psu.edu/pub/ger/fortran/hdk/MathConstnts.f95 ! ! by J.E. Akin: http://www.owlnet.rice.edu/~mech517/Books/oop2.pdf. ! Also see Table of Constants to 50 Places at: ! http://numbers.computation.free.fr/Constants/Miscellaneous/digits.html ! Special thanks to Howard W. Ludwig. Implicit none integer, public, parameter :: DP = selected_real_kind(15) real(kind=DP), public, parameter:: & Deg_Per_Rad = 57.2957795130823208767981548_DP, & Rad_Per_Deg = 0.01745329251994329576923691_DP, & e_Value = 2.7182818284590452353602287_DP, & e_Recip = 0.3678794411714423215955238_DP, & e_Squared = 7.3890560989306502272304275_DP, & Log10_of_e = 0.4342944819032518276511289_DP, & Euler = 0.5772156649015328606065121_DP, & Euler_Log = -0.5495393129816448223376617_DP, & Gamma = 0.5772156649015328606065121_DP, & Gamma_Log = -0.5495393129816448223376617_DP, & Golden_Ratio = 1.6180339887498948482045868_DP, & Ln_2 = 0.6931471805599453094172321_DP, & Ln_10 = 2.3025850929940456840179915_DP, & Log10_of_2 = 0.3010299956639811952137389_DP, & pi_Value = 3.1415926535897932384626434_DP, & pi_Ln = 1.1447298858494001741434273_DP, & pi_Log10 = 0.4971498726941338543512683_DP, & pi_Over_2 = 1.5707963267948966192313217_DP, & pi_Over_3 = 1.0471975511965977461542145_DP, & pi_Over_4 = 0.7853981633974483096156608_DP, & pi_Recip = 0.3183098861837906715377675_DP, & pi_Squared = 9.8696044010893586188344910_DP, & pi_Sq_Root = 1.7724538509055160272981675_DP, & Sq_Root_of_2 = 1.4142135623730950488016887_DP, & Sq_Root_of_3 = 1.7320508075688772935274463_DP End Module Math_Constants_Module program print_pi use math_constants_module print *, pi_Value end program print_pi