Skip to content

Commit 83c212c

Browse files
authored
Merge pull request #97 from foxtran/fix/cosd
PWR075: fix couple mistakes in benchmark
2 parents cd1cb8a + 76849ca commit 83c212c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Checks/PWR075/benchmark/solution.f90

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
!
33
! The Fortran standard specifies the availability of:
44
!
5-
! - `cosd` and `sind`, which operate on degrees and real(4) types (Fortran 23).
5+
! - `cosd` and `sind`, which operate on degrees and real type (Draft Fortran 2023: 16.9.62; 16.9.191).
66
! - `dcos` and `dsin`, which operate on radians and real(8) types (Fortran 77).
77
!
88
! To replace `dcosd` and `dsind`, let's convert from degrees to radians
@@ -20,13 +20,13 @@ module trigonometric_utils
2020
real(kind=c_double) function dcosd(degrees)
2121
real(kind=c_double), intent(in) :: degrees
2222
! `dcos` expects the angle to be in radians, not degrees
23-
dcosd = dcos(degrees * pi / 180.0)
23+
dcosd = dcos(degrees * pi / 180.0_c_double)
2424
end function dcosd
2525

2626
real(kind=c_double) function dsind(degrees)
2727
real(kind=c_double), intent(in) :: degrees
2828
! `dsin` expects the angle to be in radians, not degrees
29-
dsind = dsin(degrees * pi / 180.0)
29+
dsind = dsin(degrees * pi / 180.0_c_double)
3030
end function dsind
3131
end module trigonometric_utils
3232

0 commit comments

Comments
 (0)