View previous topic :: View next topic |
Author |
Message |
simon
Joined: 05 Jul 2006 Posts: 268
|
Posted: Tue Dec 04, 2018 5:05 am Post subject: Version 8.40 loss of precision |
|
|
In version 8.40 I get a compilation warning message that I was not getting in earlier versions for the following code:
Code: | Module m
Integer, Parameter, Public :: dp = Kind(1.0d0) ! - double precision -
Integer, Parameter, Public :: sp = Kind(1.0e0) ! - single precision -
#if DP==1
Integer, Parameter, Public :: rp = dp ! - default precision -
#else
Integer, Parameter, Public :: rp = sp ! - default precision -
#endif
!
Real(Kind=rp), Parameter, Public :: million = 1000000.0_rp ! - one million -
End Module m
|
I compile with /CFPP /VPARAM DP 1
The error message is:
A REAL constant has been trucated with possible loss of precision |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7916 Location: Salford, UK
|
Posted: Tue Dec 04, 2018 9:09 am Post subject: |
|
|
Sorry about this. We are still getting the occasional false error report with this new test for loss of precision. I have fixed this particular failure for the next release after v8.40. |
|
Back to top |
|
|
simon
Joined: 05 Jul 2006 Posts: 268
|
Posted: Tue Dec 04, 2018 1:13 pm Post subject: |
|
|
Thanks, Paul. Does that mean that the error report is spurious and I can simply ignore it? |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7916 Location: Salford, UK
|
Posted: Tue Dec 04, 2018 2:09 pm Post subject: |
|
|
Yes it does. |
|
Back to top |
|
|
|