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
Jitse Niesen
5879937f58
Merge in jdh8's branch.
...
* Enable singular matrix power and complex exponents.
* Eliminate unnecessary copying for sparse Kronecker product.
2013-07-21 20:50:15 +01:00
Gael Guennebaud
2f593ee67c
merge with main branch
2013-07-17 13:21:35 +02:00
Gael Guennebaud
5a4519d2b4
Revisit the implementation of random_default_impl for integer to make sure avoid overflows and compiler warnings.
2013-07-10 21:11:41 +02:00
Chen-Pang He
04bd1e3fc0
Slightly optimize atanh2.
2013-07-08 16:49:27 +08:00
Gael Guennebaud
62670c83a0
Fix bug #314 : move remaining math functions from internal to numext namespace
2013-06-10 23:40:56 +02:00
Gael Guennebaud
64054ee396
Add nvcc support for normalize, initializers, and fuzzy comparisons
2013-06-05 15:38:33 +02:00
Gael Guennebaud
9cd2d14005
merge with default branch
2013-04-19 11:21:39 +02:00
Gael Guennebaud
12439e1249
Port SelfCwiseBinaryOp and Dot.h to nvcc, fix portability issue with std::min/max
2013-04-05 16:35:49 +02:00
Jitse Niesen
97c9e3c74f
Handle special case in atanh2(x,y) when y = 0.
...
This fixes matrix_power unit test on clang.
2013-03-09 16:58:05 +00:00
Hauke Heibel
57e50789f3
Added missing using std::sqrt.
2013-01-27 13:46:06 +01:00
Gael Guennebaud
a76fbbf397
Fix bug #314 :
...
- remove most of the metaprogramming kung fu in MathFunctions.h (only keep functions that differs from the std)
- remove the overloads for array expression that were in the std namespace
2012-11-06 15:25:50 +01:00
Chen-Pang He
d23134e4a7
Avoid inefficient 2x2 LU. Move atanh to internal for maintainability.
2012-08-30 23:40:30 +08:00
Benoit Jacob
69124cfca2
Automatic relicensing to MPL2 using Keirs script. Manual fixup follows.
2012-07-13 14:42:47 -04:00
Gael Guennebaud
5dbdde0420
Fix bug #480 : workaround the Android NDK defining isfinite as a macro
2012-07-05 17:22:25 +02:00
Jitse Niesen
3c412183b2
Get rid of include directives inside namespace blocks (bug #339 ).
2012-04-15 11:06:28 +01:00
Gael Guennebaud
0d03492e1e
std::isfinite is non standard
2012-01-23 21:49:00 +01:00
Igor Krivenko
36457178f9
bug #352:properly cast constants
2011-12-09 23:38:41 +01:00
Gael Guennebaud
fb3aa7220f
reimplement abs2 not to use std::norm which is incredibly slow.
2011-11-08 22:42:51 +01:00
Gael Guennebaud
22bff949c8
protect calls to min and max with parentheses to make Eigen compatible with default windows.h
...
(transplanted from 49b6e9143e1d74441924c0c313536e263e12a55c
)
2011-07-21 11:19:36 +02:00
Gael Guennebaud
87ac09daa8
Simplify the use of custom scalar types, the rule is to never directly call a standard math function using std:: but rather put a using std::foo before and simply call foo:
...
using std::max;
max(a,b);
2011-05-25 08:41:45 +02:00
Gael Guennebaud
aea630a98a
factorize implementation of standard real unary math functions, and add acos, asin
2011-02-17 17:37:11 +01:00
Benoit Jacob
ba9f6a2c3b
now random<integer types> spans over 0..RAND_MAX, or -RAND_MAX/2..RAND_MAX/2 for signed types, or the most significant bits for smaller integer types.
2011-02-07 10:55:41 -05:00
Gael Guennebaud
2f71277105
add global tan function
2011-02-03 14:45:21 +01:00