Ignore:
Timestamp:
05/11/16 14:56:07 (8 years ago)
Author:
ymipsl
Message:

Remapper : manage some floating rounding error leading to some NAN

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/extern/remap/src/polyg.cpp

    r845 r849  
    131131        double s = 0.5 * (a + b + c); 
    132132        double t = tan(0.5*s) * tan(0.5*(s - a)) * tan(0.5*(s - b)) * tan(0.5*(s - c)); 
    133         assert(t >= 0); 
    134 //        if (t<0) return 0. ; 
     133//      assert(t >= 0); 
     134  if (t<1e-20) return 0. ; 
    135135        return 4 * atan(sqrt(t)); 
    136136} 
Note: See TracChangeset for help on using the changeset viewer.