1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-08-13 18:24:39 +02:00

[fortran/en] correct sqrt (#5169)

the integer inside the sqrt function need to be converted to real.
This commit is contained in:
Ily83
2024-11-08 23:31:48 +01:00
committed by GitHub
parent a7068ea636
commit ccdb3504c9

View File

@@ -461,10 +461,10 @@ end module fruity
! to express loop-level parallelism
integer :: i
real :: array(100)
real :: array(10)
DO CONCURRENT (i = 1:size(array))
array(i) = sqrt(i**i)
array(i) = sqrt(real(i)**i)
END DO