140 Commits

Author SHA1 Message Date
Gael Guennebaud
e1b27bcb0b Workaround MSVC missing overloads of std::fpclassify for integral types 2015-11-20 13:55:34 +01:00
Gael Guennebaud
29a94c8055 compilation issue 2015-11-02 16:11:59 +01:00
Gael Guennebaud
b32948c642 bug #1102: fix multiple definition linking issue 2015-10-30 22:25:59 +01:00
Gael Guennebaud
c688cc28d6 fix copy/paste typo 2015-10-28 20:20:05 +01:00
Gael Guennebaud
28ddb5158d Enable std::isfinite/nan/inf on MSVC 2013 and newer and clang. Fix isinf for gcc4.4 and older msvc with fast-math. 2015-10-28 16:27:20 +01:00
Gael Guennebaud
e3031d7bfa bug #1008: improve handling of fast-math mode for older gcc versions. 2015-10-27 16:43:23 +01:00
Gael Guennebaud
2475a1de48 bug #1008: stabilize isfinite/isinf/isnan/hasNaN/allFinite functions for fast-math mode. 2015-10-27 15:39:50 +01:00
Gael Guennebaud
deb261f64b Make abs2 compatible with custom complex types 2015-10-02 10:33:25 +02:00
Benoit Steiner
d46bacb6bb Call numext::mini instead of std::min in several places. 2015-09-28 10:40:41 -07:00
Benoit Steiner
2ed1495eec nvcc doesn't support std::min or std::max on GPU. Use our own custom implementation instead 2015-08-27 16:59:55 -07:00
Christoph Hertzberg
61e0977e10 Protect all calls to isnan, isinf and isfinite with parentheses. 2015-08-14 17:32:34 +02:00
Gael Guennebaud
c11971de37 Fix compilation of isnan(complex) 2015-07-20 12:56:01 +02:00
Gael Guennebaud
f5aa640862 Clean some previous changes and more cuda fixes 2015-07-15 10:57:55 +02:00
Nicolas Mellado
20b96025fd Replace double constants by Scalar constants 2015-07-11 20:02:30 +02:00
Nicolas Mellado
5359e5cdb2 Protect against compilation errors with nvcc and numext/complex.
Disable functions explicitely involving std::complex when compiling with nvcc.
Improve code compatilibity using the new macro EIGEN_USING_NUMEXT_MATH (same spirit than EIGEN_USING_STD_MATH but for numext functions)
2015-07-06 20:55:01 +02:00
Emilie Guy
ea7113dd0c typo correction in mathFunction 2015-07-06 14:31:08 +02:00
Benoit Steiner
44eedd8915 Marked the cast functions as EIGEN_DEVICE_FUNC to ensure that we can run casting on GPUs 2015-06-30 15:48:55 -07:00
Gael Guennebaud
84d103bee8 Enable C++11 math function in a more conservative manner. 2015-06-11 21:45:02 +02:00
Gael Guennebaud
d93ba137f2 Introduce EIGEN_PI, get rid of M_PI and acos(-1.0) 2015-06-10 17:12:10 +02:00
Gael Guennebaud
9756c7fb4d Make more use of EIGEN_HAS_C99_MATH 2015-06-10 16:26:55 +02:00
Gael Guennebaud
93a62265dc fix isinf(complex(inf,NaN)) to return false. 2015-06-10 16:19:10 +02:00
Gael Guennebaud
b0d5aaafcc Rename free functions isFinite, isInf, isNaN to be compatible with c++11 2015-06-10 16:17:09 +02:00
Deanna Hood
e5048b5501 Use std::isfinite when available 2015-04-20 14:59:57 -04:00
Deanna Hood
249c48ba00 Incorporate C++11 check into EIGEN_HAS_C99_MATH macro 2015-04-20 14:57:04 -04:00
Deanna Hood
0250f4a9f2 Merged default into unary-array-cwise-functors 2015-04-20 14:01:35 -04:00
Deanna Hood
0339502a4f Only use std::isnan and std::isinf if they are available 2015-04-20 13:14:06 -04:00
Deanna Hood
085aa8e601 Don't use M_PI since it's only guaranteed to be defined in Eigen/Geometry 2015-04-08 13:59:18 -05:00
Gael Guennebaud
3d59ae0203 Fix hypot(0,0). 2015-03-27 09:59:24 +01:00
Deanna Hood
83e5b7656b Use M_PI instead of acos(-1) for pi 2015-03-22 06:04:31 +10:00
Gael Guennebaud
f329d0908a Improve random number generation for integer and add unit test 2015-03-19 15:10:36 +01:00
Deanna Hood
596be3cd86 Use std::arg for real numbers when c++11 is used, custom implementation otherwise 2015-03-17 15:28:12 +10:00
Deanna Hood
e26134ed62 Use std::round when c++11 is used, custom implementation otherwise 2015-03-17 14:55:14 +10:00
Deanna Hood
fef4e071d7 Rename isinf to isInf 2015-03-17 05:58:47 +10:00
Deanna Hood
1d76ceab55 Remove floor, ceil, round for complex numbers 2015-03-17 02:36:07 +10:00
Deanna Hood
fb68b149cb Rename isnan to isNaN 2015-03-17 02:04:42 +10:00
Benoit Jacob
e56aabf205 Refactor computeProductBlockingSizes to make room for the possibility of using lookup tables 2015-03-15 18:05:12 -04:00
Gael Guennebaud
d99ab35f9e Fix internal::random(x,y) for integer types. The previous implementation could return y+1. The new implementation uses rejection sampling to get an unbiased behabior. 2015-03-13 21:12:46 +01:00
Deanna Hood
31fdd67756 Additional unary coeff-wise functors (isnan, round, arg, e.g.) 2015-03-11 06:39:23 +10:00
Christoph Hertzberg
ecbf2a6656 log1p is defined only for real Scalars in C++11 2015-02-21 19:58:24 +01:00
Gael Guennebaud
4371911861 Remove useless and non standard numext::atanh2 function. 2014-12-08 16:44:34 +01:00
Gael Guennebaud
bea36925db bug #876: implement a portable log1p function 2014-12-08 16:26:53 +01:00
Christoph Hertzberg
cf09c5f687 Prevent CUDA calling a __host__ function from a __host__ __device__ function is not allowed error. 2014-10-21 20:40:09 +02:00
Gael Guennebaud
fe57b2f963 bug #701: workaround (min) and (max) blocking ADL by introducing numext::mini and numext::maxi internal functions and a EIGEN_NOT_A_MACRO macro. 2014-10-20 15:55:32 +02:00
Gael Guennebaud
8b3be4907d log2(int) must be inlined. 2014-09-18 10:53:53 +02:00
Gael Guennebaud
fc23e93707 Add a portable log2 function for integers 2014-09-17 09:56:07 +02:00
Gael Guennebaud
e54898f53e bug #619: workaround MSVC 2008 implementing std::abs for int only on WINCE 2014-09-07 23:02:30 +02:00
Gael Guennebaud
42e27d41a2 Fix hypot() and hypotNorm() wrt NaN and INF values. 2014-09-02 16:09:39 +02:00
Gael Guennebaud
7098e6d976 Add isfinite overload for complexes. 2014-04-14 21:57:49 +02:00
Gael Guennebaud
1bb1a57ef7 merge with default branch 2013-11-05 10:31:59 +01:00
Hauke Heibel
097a105603 Disabled std::log1p on Cygwin. 2013-08-10 19:10:23 +02:00