Leonardo de Moura
abc370a011
feat(util/numerics): serialization for mpz and mpq
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-27 18:32:01 -08:00
Leonardo de Moura
5f11392fcc
test(numerics/numeric_traits): add missing test
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-10-28 07:50:33 -07:00
Leonardo de Moura
1d18f60dd5
fix(numerics): add missing numeric_traits<float>::zero()
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-10-28 07:47:23 -07: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
1429cc9df2
feat(numerics): add finite field Z/pZ
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-10-18 13:27:28 -07:00
Leonardo de Moura
bdade0e638
fix(numerics): problem with gcd tests on OSX
...
Now, we only test gcd(a, b) for a != b && a != 0 && b != 0.
When one of these conditions do not hold, the result is implementation dependent.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-10-17 10:38:02 -07:00
Leonardo de Moura
cf2c0f8ebb
feat(numerics): add gcd and extended gcd templates (for primitive types)
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-10-16 18:18:20 -07:00
Leonardo de Moura
39f68ed0d6
feat(numerics): add is_prime function
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-10-16 17:25:08 -07:00
Leonardo de Moura
1097bbfb22
fix(style): fix warnings produced by cpplint.py, disable sizeof(type) warning
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-10-16 17:04:39 -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
Leonardo de Moura
ff04c5a2e2
test(numerics): add test to make sure that zeros of different precision mpfp numbers are the equal.
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-10-16 16:54:43 -07:00
Leonardo de Moura
467eff4662
add(numerics): add prime number generator/iterator
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-10-16 16:05:45 -07:00
Soonho Kong
4602dfd209
test(util/numerics): more tests to improve coverage
2013-09-28 23:38:17 -07:00
Soonho Kong
fb3635a9ef
test(util/numerics/mpbp): add more tests for improving coverage
2013-09-28 01:01:52 -07:00
Leonardo de Moura
9d8ff0eadb
test(mpz): add unit tests for mpz
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-26 20:01:39 -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
Leonardo de Moura
42a7094ca2
Fix bug in display_decimal. Add more mpq tests
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-23 09:42:49 -07:00
Leonardo de Moura
823fe6df07
Move test from lean.cpp
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-18 11:02:29 -07:00
Leonardo de Moura
65b4845fbc
Add more tests to improve coverage. Fix bug in mpz.
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-18 00:28:50 -07:00
Soonho Kong
5a38480cf7
Remove "continue_on_violation(true);" from tests
2013-08-14 13:24:18 -07:00
Soonho Kong
975730a3fb
Add test for mpfp
2013-08-06 20:00:37 -07:00
Leonardo de Moura
c2ebe42ca8
Move numerics and sexpr to util
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-07-24 14:57:51 -07:00