Hi,
PROGRAM testsin
real(kind=8) :: pi=3.14159265358979
real(kind=8) :: out
out = dsin(pi)
print *,out
END PROGRAM testsin
Just an additional data point.
If you run this with -Wconversion -Wconversion-extra, you will get
testsin.f90:2:20:
2 | real(kind=8) :: pi=3.14159265358979
| 1
Warning: Conversion from 'REAL(4)' to 'REAL(8)' at (1) [-Wconversion-extra]
testsin.f90:2:36:
2 | real(kind=8) :: pi=3.14159265358979
| 1
Warning: Non-significant digits in 'REAL(4)' number at (1), maybe
incorrect KIND [-Wconversion-extra]
so the compiler has a facility to help you detect such errors.
Regards
Thomas