* xmlXPathIsInf: * @val: a double value * * Checks whether a double is an infinity. * * Returns 1 if the value is +Infinite, -1 if -Infinite, 0 otherwise */
| 203 | * Returns 1 if the value is +Infinite, -1 if -Infinite, 0 otherwise |
| 204 | */ |
| 205 | int |
| 206 | xmlXPathIsInf(double val) { |
| 207 | #ifdef isinf |
| 208 | return isinf(val) ? (val > 0 ? 1 : -1) : 0; |
| 209 | #else |
| 210 | if (val >= xmlXPathPINF) |
| 211 | return 1; |
| 212 | if (val <= -xmlXPathPINF) |
| 213 | return -1; |
| 214 | return 0; |
| 215 | #endif |
| 216 | } |
| 217 | |
| 218 | #endif /* SCHEMAS or XPATH */ |
| 219 |
no test coverage detected