Sha256: 91e7ab82862f465e8563369c8353113acacca11577d4aa2c02a47d89f7bfbedf

Contents?: true

Size: 497 Bytes

Versions: 3

Compression:

Stored size: 497 Bytes

Contents

typedef dcomplex dtype;
typedef double rtype;
#define cT  numo_cDComplex
#define cRT numo_cDFloat
#define mTM numo_mDComplexMath

#include "complex_macro.h"

static inline bool c_nearly_eq(dtype x, dtype y) {
    return c_abs(c_sub(x,y)) <= (c_abs(x)+c_abs(y))*DBL_EPSILON*2;
}

/* generates a random number on [0,1)-real-interval */
inline static dtype m_rand(dtype max)
{
    dtype z;
    REAL(z) = genrand_res53_mix() * REAL(max);
    IMAG(z) = genrand_res53_mix() * IMAG(max);
    return z;
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
numo-narray-0.9.0.3-x86-mingw32 ext/numo/narray/numo/types/dcomplex.h
numo-narray-0.9.0.3-x64-mingw32 ext/numo/narray/numo/types/dcomplex.h
numo-narray-0.9.0.3 ext/numo/narray/numo/types/dcomplex.h