| 40 | CONSISTANT |
| 41 | }; |
| 42 | inline LimitsDiff ValidateInf(float x1, float x2) |
| 43 | { |
| 44 | if ( (fabs(x1) < largeThreshold && fabs(x2) < largeThreshold) |
| 45 | // If either value is NaN, consider this a NaN error rather than an Inf error. |
| 46 | || (std::isnan(x1) || std::isnan(x2)) ) |
| 47 | { |
| 48 | return NOT_APPLICABLE; |
| 49 | } |
| 50 | if (((x1 >= largeThreshold) && (x2 < largeThreshold)) || |
| 51 | ((x1 < largeThreshold) && (x2 >= largeThreshold)) || |
| 52 | ((x1 <= -largeThreshold) && (x2 > -largeThreshold)) || |
| 53 | ((x1 > -largeThreshold) && (x2 <= -largeThreshold))) |
| 54 | { |
| 55 | return INCONSISTANT; |
| 56 | } |
| 57 | return CONSISTANT; |
| 58 | } |
| 59 | |
| 60 | inline LimitsDiff ValidateNan(float x1, float x2) |
| 61 | { |