Sha256: 8afa4bdd48dc708d1416c9e527ab456481958d9ad5662f062765be3e8575d645

Contents?: true

Size: 501 Bytes

Versions: 3

Compression:

Stored size: 501 Bytes

Contents

typedef double dtype;
typedef double rtype;
#define cT  numo_cDFloat
#define cRT numo_cDFloat
#define mTM numo_mDFloatMath

#include "float_macro.h"

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

#define m_min_init numo_dfloat_new_dim0(0.0/0.0)
#define m_max_init numo_dfloat_new_dim0(0.0/0.0)
#define m_extract(x) rb_float_new(*(double*)x)
#define m_nearly_eq(x,y) (fabs(x-y)<=(fabs(x)+fabs(y))*DBL_EPSILON*2)

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/dfloat.h
numo-narray-0.9.0.3-x64-mingw32 ext/numo/narray/numo/types/dfloat.h
numo-narray-0.9.0.3 ext/numo/narray/numo/types/dfloat.h