Sha256: 20c982bac0a60018b4ffba0590312d7eda0e890b061f3b1fb7c0e2f7ffdddcac

Contents?: true

Size: 1.07 KB

Versions: 2

Compression:

Stored size: 1.07 KB

Contents

/////////////////////////////////////////////////////////////////////
// = NMatrix
//
// A linear algebra library for scientific computation in Ruby.
// NMatrix is part of SciRuby.
//
// NMatrix was originally inspired by and derived from NArray, by
// Masahiro Tanaka: http://narray.rubyforge.org
//
// == Copyright Information
//
// SciRuby is Copyright (c) 2010 - 2013, Ruby Science Foundation
// NMatrix is Copyright (c) 2013, Ruby Science Foundation
//
// Please see LICENSE.txt for additional copyright notices.
//
// == Contributing
//
// By contributing source code to SciRuby, you agree to be bound by
// our Contributor Agreement:
//
// * https://github.com/SciRuby/sciruby/wiki/Contributor-Agreement
//
// == types.h
//
// Definition of simple types used throughout NMatrix.

#ifndef NMATRIX_TYPES_H
#define NMATRIX_TYPES_H

/*
 * Standard Includes
 */

#include <stdint.h>

/*
 * Macros
 */

#define EPSILON 1E-10
#define FP_IS_ZERO(n) (-EPSILON < n && n < EPSILON)
#define FP_EQUAL(a, b) FP_IS_ZERO((a - b))

/*
 * Types
 */

typedef float		float32_t;
typedef double	float64_t;

#endif

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
nmatrix-0.0.5 ext/nmatrix/types.h
nmatrix-0.0.4 ext/nmatrix/types.h