Soonho Kong
39645390ff
chore(util/*): add cstddef header before including gmp.h/mpfr.h
...
Reference: https://gcc.gnu.org/gcc-4.9/porting_to.html
------
Header <cstddef> changes
The <cstddef> header was updated for C++11 support and this breaks some
libraries which misuse macros meant for internal use by GCC only. For
instance with GMP versions up to 5.1.3, you may see:
/usr/include/c++/4.9.0/cstddef:51:11: error: ‘::max_align_t’ has not been declared
using ::max_align_t;
^
Another possible error is:
someheader.h:99:13: error: ‘ptrdiff_t’ does not name a type
A workaround until libraries get updated is to include <cstddef> or
<stddef.h> before any headers from that library.
2014-10-07 02:36:57 -04:00
Leonardo de Moura
5489e46ce5
refactor(util/numerics): explicit initialization/finalization
2014-09-24 10:12:29 -07:00
Leonardo de Moura
15f0899efb
refactor(*): replace LEAN_THREAD_LOCAL with MK_THREAD_LOCAL_GET, the new macro uses the Boost thread_local_ptr instead of 'thread_local' directive
...
Motivation: clang++ on OSX does not support 'thread_local'.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-07 10:18:36 -07:00
Leonardo de Moura
8f2fe273ea
refactor(*): isolate std::thread dependency
...
This commit allows us to build Lean without the pthread dependency.
It is also useful if we want to implement multi-threading on top of Boost.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-09 15:20:26 -08:00
Leonardo de Moura
e208309abd
refactor(numerics): rename power operator to pow, the idea is to follow the C/C++ name convention for the power operator
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-10-21 17:23:56 -07:00
Leonardo de Moura
105f55c68b
feat(numerics): add zero() method to all numeric_traits
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-10-16 16:55:17 -07:00
Soonho Kong
ab6ca82e6f
Update to suppress unused-parameter warnings
2013-09-19 22:40:34 -07:00
Soonho Kong
bc60b47295
Apply coding style
2013-09-13 18:48:09 -07:00
Leonardo de Moura
8c735f1daa
Use consistent coding style for spaces after ','
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-13 12:49:03 -07:00
Leonardo de Moura
26097475fd
Use fullpath in #include directives.
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-12 20:04:10 -07:00
Soonho Kong
fae6c29237
Fix memory leaks in mpfp.h
2013-09-10 13:26:14 -07:00
Soonho Kong
eb29a67395
Fix mpfp::operator^= to resolve operator overloading problem
2013-08-14 23:49:26 -07:00
Soonho Kong
70f383eb82
Add unary minus operator overloadings to mpq & mpfp
2013-08-14 00:01:03 -07:00
Soonho Kong
5f143f164e
Fix numeric_traits<mpfp>::pi constants
2013-08-13 20:09:06 -07:00
Soonho Kong
02900e2c83
Add abs/floor/ceil to double/float/mpq/mpfp
2013-08-13 20:09:06 -07:00
Soonho Kong
e123dd8e58
Use numeric_traits<mpfp>::get_mpfp_rnd() as a default rounding mode in mpfp operations
2013-08-13 00:35:14 -07:00
Leonardo de Moura
fb56869aae
Fix cygwin problem.
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-12 15:22:08 -07:00
Soonho Kong
375bc817cc
Add more to mpfp
2013-08-09 22:41:07 -07:00
Soonho Kong
0f48f73e14
Add constants and transcendental functions to mpfp
2013-08-07 19:32:15 -07:00
Soonho Kong
03dc15868b
Add more operator overloadings to mpfp
2013-08-07 19:32:15 -07:00
Soonho Kong
2a8c9e9c06
Reformat mpfp.h
2013-08-07 19:32:03 -07:00
Soonho Kong
d22b4bc9f1
Add mpfp, a wrapper for MPFR
2013-08-06 19:59:58 -07:00