Changeset 293


Ignore:
Timestamp:
Apr 26, 2005, 10:07:48 AM (16 years ago)
Author:
Peter
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/matrix.cc

    r273 r293  
    66#include "vector.h"
    77
     8#include <cmath>
    89#include <iostream>
    910#include <sstream>
     
    106107    for (size_t i=0; i<rows(); i++)
    107108      for (size_t j=0; j<columns(); j++)
    108         if ((*this)(i,j)>other(i,j)+d || (*this)(i,j)<other(i,j)-d )
     109        // two last cond. are to check for nans
     110        if (fabs( (*this)(i,j)-other(i,j) ) > d ||
     111            (*this)(i,j)!=(*this)(i,j) || other(i,j)!=other(i,j))
    109112          return false;
    110113
Note: See TracChangeset for help on using the changeset viewer.