Software Archive
Read-only legacy content

A possible bug

Intel_C_Intel
Employee
395 Views
I was running the following code the other day. I compiled the code with command df /check:power /fast, then I found the value of b(1) is NaN. I was very amazed to the result. In the documentation, it says when /fast is specified, /check:nopower is always used. Apparently here /check:power is used even if /fast is specified. But what's worse is that how 0**0.3 could become not defined? I only know 0**0 is not valid in some situation.

implicit none

real :: a(2), alpha, b(2)

alpha=0.3
a(1)=0.0
a(2)=2.0

b=a**alpha

print "(f8.4)", b
end
0 Kudos
1 Reply
Steven_L_Intel1
Employee
395 Views
Not quite. /fast specifies initial defaults for other switches, such as /check:nopower. But if you then explicitly override the setting, as you did, then the new setting will be used.

Steve
0 Kudos
Reply