Sha256: 9b3bbf30d768ac0c7ff2441251e23f1eb512b66e10d7e445350680fbdc5107f3
Contents?: true
Size: 502 Bytes
Versions: 3
Compression:
Stored size: 502 Bytes
Contents
typedef scomplex dtype; typedef float rtype; #define cT numo_cSComplex #define cRT numo_cSFloat #define mTM numo_mSComplexMath #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))*FLT_EPSILON*2; } /* generates a random number on [0,1)-real-interval */ inline static dtype m_rand(dtype max) { dtype z; REAL(z) = to_real2(gen_rand32()) * REAL(max); IMAG(z) = to_real2(gen_rand32()) * IMAG(max); return z; }
Version data entries
3 entries across 3 versions & 1 rubygems