| 342 | |
| 343 | template <typename type> |
| 344 | static type |
| 345 | _npy_spacing(type x) |
| 346 | { |
| 347 | /* XXX: npy isnan/isinf may be optimized by bit twiddling */ |
| 348 | if (npy_isinf(x)) { |
| 349 | return numeric_limits<type>::nan; |
| 350 | } |
| 351 | |
| 352 | return _next(x, 1) - x; |
| 353 | } |
| 354 | |
| 355 | /* |
| 356 | * Instantiation of C interface |
no test coverage detected