Unproper functionality of usuall things in my program on Intel Visual Fortran 10.1.019 64 bit

Les Neilson
Total Points:
5,676
Status Points:
5,176
Brown Belt
March 25, 2008 4:08 AM PDT
Rate
 
#1

Comparing floating-point numbers for equality is your problem.

You should really use a tolerance and check the abs of the difference between the two numbers.

eg :

real(8) :: diff
real(8) :: tolerance      ! set to some appropriate acceptable value

diff = omega - (omega_center-4.0d0*gamma)

if ( abs(diff) <= tolerance ) then
       ! the two numbers are considered to be equal

Les



Intel Software Network Forums Statistics

8293 users have contributed to 31244 threads and 99122 posts to date.
In the past 24 hours, we have 12 new thread(s) 15 new posts(s), and 25 new user(s).

In the past 3 days, the most popular thread for everyone has been huge pages on linux? The most posts were made to Pipeline buffer between stages? The post with the most views is Another example attached (Tr

Please welcome our newest member bwillems