Created
October 9, 2015 10:06
-
-
Save davydden/1f9ebf3692beca2438f8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program test | |
implicit none | |
integer, parameter :: dp = kind(1.0d0) | |
real(dp), external :: ddot | |
real, external :: sdot | |
real, dimension(3) :: a,b | |
real(dp), dimension(3) :: d,e | |
integer :: i | |
do i = 1,3 | |
a(i) = 1.0*i | |
b(i) = 3.5*i | |
d(i) = 1.0d0*i | |
e(i) = 3.5d0*i | |
end do | |
write (*,*) "sdot real(4) = ", sdot(3,a,1,b,1) ! should work and return 49.0 | |
write (*,*) "ddot real(8) = ", ddot(3,d,1,e,1) ! should work and return 49.0 | |
if (ABS(ddot(3,d,1,e,1)-sdot(3,a,1,b,1))>1E-10) then | |
call exit(1) | |
endif | |
end program test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment