MCPcopy Create free account
hub / github.com/numpy/numpy / _npy_spacing

Function _npy_spacing

numpy/core/src/npymath/ieee754.cpp:344–353  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

342
343template <typename type>
344static 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

Callers 3

npy_spacingfFunction · 0.85
npy_spacingFunction · 0.85
npy_spacinglFunction · 0.85

Calls 1

_nextFunction · 0.85

Tested by

no test coverage detected