GNU Fortran, MinGW 4.8.1
IDE: Code Blocks 13.12
File ext: .f90
How to make powers of complex with float exponent without resulting in NaN?
Compiled with mingw32-gfortran.exe 4.8.1, with flags for no line length limit (free/fixed forms).
Why? I'm refactoring a fortran code to use it from a c# program, and, although the power with the float works on the environment the code was created (visual studio, not sure about compiler, intel maybe), it does not work on my environment (code blocks, mingw). So, even if in this case i can just use an integer, it might not be so in the future.
Thanks
IDE: Code Blocks 13.12
File ext: .f90
Code:
program hello
implicit none
COMPLEX rk
rk=2*0
rk = rk **4 ! Ok
rk = rk **4. ! NaN
end program
How to make powers of complex with float exponent without resulting in NaN?
Compiled with mingw32-gfortran.exe 4.8.1, with flags for no line length limit (free/fixed forms).
Why? I'm refactoring a fortran code to use it from a c# program, and, although the power with the float works on the environment the code was created (visual studio, not sure about compiler, intel maybe), it does not work on my environment (code blocks, mingw). So, even if in this case i can just use an integer, it might not be so in the future.
Thanks