/[escript]/trunk/escript/src/LocalOps.h
ViewVC logotype

Diff of /trunk/escript/src/LocalOps.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2772 by jfenwick, Mon Nov 23 05:10:53 2009 UTC revision 2773 by jfenwick, Wed Nov 25 04:02:01 2009 UTC
# Line 41  namespace escript { Line 41  namespace escript {
41  inline  inline
42  bool nancheck(double d)  bool nancheck(double d)
43  {  {
44  #ifndef FP_NAN      // Q: so why not just test d!=d?  #ifndef isnan       // Q: so why not just test d!=d?
45      return false;   // A: Coz it doesn't always work [I've checked].      return false;   // A: Coz it doesn't always work [I've checked].
46  #else           // One theory is that the optimizer skips the test.  #else           // One theory is that the optimizer skips the test.
47      return isnan(d);      return isnan(d);
# Line 55  bool nancheck(double d) Line 55  bool nancheck(double d)
55  inline  inline
56  double makeNaN()  double makeNaN()
57  {  {
58  #ifndef FP_NAN  #ifndef isnan
59      return nan();      return nan();
60  #else  #else
61      return sqrt(-1);      return sqrt(-1);

Legend:
Removed from v.2772  
changed lines
  Added in v.2773

  ViewVC Help
Powered by ViewVC 1.1.26