| 163 | */ |
| 164 | ATTRIBUTE_NO_SANITIZE("float-divide-by-zero") |
| 165 | void |
| 166 | xmlInitXPathInternal(void) { |
| 167 | #if defined(NAN) && defined(INFINITY) |
| 168 | xmlXPathNAN = NAN; |
| 169 | xmlXPathPINF = INFINITY; |
| 170 | xmlXPathNINF = -INFINITY; |
| 171 | #else |
| 172 | /* MSVC doesn't allow division by zero in constant expressions. */ |
| 173 | double zero = 0.0; |
| 174 | xmlXPathNAN = 0.0 / zero; |
| 175 | xmlXPathPINF = 1.0 / zero; |
| 176 | xmlXPathNINF = -xmlXPathPINF; |
| 177 | #endif |
| 178 | } |
| 179 | |
| 180 | /** |
| 181 | * xmlXPathIsNaN: |