- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Steve
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page