From 241b2ade8b015ecc0d6debd97c9fcf015e6aeedf Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 26 Aug 2018 11:40:38 +0200 Subject: [PATCH] more portable way to define PI https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/490432 and compiler will not complain about truncation --- PRIVATE | 2 +- src/math.f90 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PRIVATE b/PRIVATE index 81fd7109f..a764ade04 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit 81fd7109fea8456b8eecaaef0eec041edcce7792 +Subproject commit a764ade044735df35fac93a5204446291ee29abc diff --git a/src/math.f90 b/src/math.f90 index 955be4457..4179d6edc 100644 --- a/src/math.f90 +++ b/src/math.f90 @@ -12,7 +12,7 @@ module math implicit none private - real(pReal), parameter, public :: PI = 3.141592653589793_pReal !< ratio of a circle's circumference to its diameter + real(pReal), parameter, public :: PI = acos(-1.0_pReal) !< ratio of a circle's circumference to its diameter real(pReal), parameter, public :: INDEG = 180.0_pReal/PI !< conversion from radian into degree real(pReal), parameter, public :: INRAD = PI/180.0_pReal !< conversion from degree into radian complex(pReal), parameter, public :: TWOPIIMG = (0.0_pReal,2.0_pReal)*(PI,0.0_pReal) !< Re(0.0), Im(2xPi)