- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Compiling the attached little program with ifc -pc32 (compiler version 7.1.040) and running on two different AMD systems (Dual-Athlon-2000MP and Athlon-2000XP) gives totally wrong results for the direct power operator **. Removing the -pc32 option or replacing with -pc64 gives correct results. Turning off optimization does not change anything. Strangely enough, running the Athlon-created executable on an Intel-based PC it performs correct!
Does anybody have an idea on the cause of the problem?
Attachment:
program power_test
real :: aaa,bbb
aaa = 8.0e-6
bbb = 1./3.
print *, "Use power operator ** :", aaa**bbb
print *, "Use exponential of log:", exp(bbb*log(aaa))
end program power_test
Results:
Use power operator ** : 1.863422
Use exponential of log: 2.000000E-02
Does anybody have an idea on the cause of the problem?
Attachment:
program power_test
real :: aaa,bbb
aaa = 8.0e-6
bbb = 1./3.
print *, "Use power operator ** :", aaa**bbb
print *, "Use exponential of log:", exp(bbb*log(aaa))
end program power_test
Results:
Use power operator ** : 1.863422
Use exponential of log: 2.000000E-02
Link Copied
0 Replies

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