Commit Graph

321 Commits

Author SHA1 Message Date
jzmaddock
787cd1101e Update tests to exercise move-construct/copy better.
Fix exposed bug in tommath backend.
See also https://svn.boost.org/trac/boost/ticket/9497.
2013-12-22 09:57:01 +00:00
jzmaddock
f552968b21 Tentative fix to allow move-copy from an already moved-from object - see https://svn.boost.org/trac/boost/ticket/9497. 2013-12-21 17:00:16 +00:00
jzmaddock
8fc374c94e Apply fix for https://svn.boost.org/trac/boost/ticket/9336. 2013-12-21 16:34:09 +00:00
Christopher Kormanyos
877851ece4 Update license information. 2013-12-16 21:00:06 +01:00
jzmaddock
a7db4fb2d8 Fix pow and exp, plus numeric_limits min/max values. 2013-12-04 17:15:30 +00:00
jzmaddock
8fc8406008 Fix cpp_bin_float gcc compile.
Fix tests to work as intended.
2013-12-04 17:14:38 +00:00
John Maddock
10ed707a68 Initial merge of cpp_bin_float code from sandbox.
[SVN r86781]
2013-11-21 19:05:42 +00:00
John Maddock
239fd62dbe Add some better error checks to interval construction.
[SVN r86779]
2013-11-21 13:04:20 +00:00
John Maddock
25e5455b92 Fix min/max_exponent values (these should be base 10 not base 2 as before).
[SVN r86778]
2013-11-21 10:31:03 +00:00
John Maddock
68406722d5 Fix type of cast target when casting to allocator.
Add additional type of argument to frexp/ldexp.
Template integer types in float IO conversion routines.
Improve termination condition in asin code.
Fix some compiler errors that can occur in conversion routines.

[SVN r86339]
2013-10-17 15:11:13 +00:00
John Maddock
0a32de0fe6 Fixes for cpp_bin_float
[SVN r86294]
2013-10-13 18:13:47 +00:00
John Maddock
1972871e36 Use memcpy in more places.
Add optimized bitwise operations for unsigned integers.
Fixes #9243.
Refs #9231.

[SVN r86262]
2013-10-12 12:02:11 +00:00
John Maddock
86a3ba299f Optimize copying of allocator-free cpp_int's via memcpy.
Fix consistency of checks for exponents < 0 in powm.
Fixes #9231.
Refs #9236.

[SVN r86258]
2013-10-12 08:19:29 +00:00
John Maddock
7c2727ad61 Enable divide_qr for mixed arguments.
[SVN r86193]
2013-10-07 18:16:19 +00:00
John Maddock
d5323e2618 Fix bug in cpp_int serialization code
[SVN r85595]
2013-09-07 18:16:22 +00:00
John Maddock
9df261700f Fix test failures exposed by changes to Boost.Rational.
[SVN r85585]
2013-09-06 15:43:07 +00:00
John Maddock
331a4e3e2c Fix some invalid comparisons (GCC compiler errors).
[SVN r85573]
2013-09-05 16:08:23 +00:00
John Maddock
45c93d8fa2 Optimise squaring to use mpfr_sqr and mpfi_sqr.
[SVN r85449]
2013-08-24 17:21:28 +00:00
John Maddock
47ed6aca2e Fix some buglets in decimal rounding.
[SVN r85420]
2013-08-22 12:38:19 +00:00
John Maddock
72268f9705 Improve _Quad/__float128 selection logic.
[SVN r85354]
2013-08-15 10:45:49 +00:00
John Maddock
3f405908ad Fix mpl logic for enumerating through typelist.
[SVN r85352]
2013-08-15 10:00:52 +00:00
John Maddock
c8884355c8 Fix std::numeric_limits<>::round_error().
[SVN r85347]
2013-08-14 15:31:48 +00:00
John Maddock
bad2b89ac1 Modify cosine default evaluation code to call the sin code: less code and better precision.
[SVN r85333]
2013-08-13 17:05:54 +00:00
John Maddock
3289ba1741 Fix overflow bug.
[SVN r85314]
2013-08-12 11:58:17 +00:00
John Maddock
749394599b Fix digits10 member for cpp_int's.
[SVN r85312]
2013-08-12 11:08:47 +00:00
John Maddock
10077c1a0c Fix exact sqrt's.
[SVN r85255]
2013-08-09 17:44:48 +00:00
John Maddock
07c1027919 Update for Intel 13.1
[SVN r85253]
2013-08-09 12:27:11 +00:00
John Maddock
c5e7d59a73 Add serialization support to float128 and adaptor backends.
Use __float128 via typedefs so recent Intel compilers don't complain.

[SVN r85241]
2013-08-08 17:43:54 +00:00
Paul A. Bristow
16f091f3cd fully qualified enable_if and disable_if with boost:: to resolve ambiguity with Boost.Test on MSVC.
[SVN r85239]
2013-08-08 13:22:56 +00:00
John Maddock
6ab42a5611 Fix binary archive serialization.
Add rational serialization.

[SVN r85231]
2013-08-07 08:15:51 +00:00
John Maddock
8879d0cbc1 Fix deserialization when limb size is larger than that of the original archive.
[SVN r85220]
2013-08-06 08:30:33 +00:00
John Maddock
7aa0322d97 Fix gcc serialization code, and improve binary serialization.
[SVN r85214]
2013-08-05 15:03:07 +00:00
John Maddock
8d6ac4e631 Add missing serialization file
[SVN r85213]
2013-08-05 12:22:53 +00:00
John Maddock
904b93f22c Add tentative serialization support.
[SVN r85212]
2013-08-05 11:52:07 +00:00
John Maddock
86e42b0a19 Add missing parameter name.
[SVN r85205]
2013-08-04 08:19:13 +00:00
John Maddock
af494a898b Add support for integer square roots.
[SVN r85184]
2013-08-01 17:50:17 +00:00
John Maddock
d885506c9f Round mpfr floats towards zero when converting to an integer to match what built in floats do.
[SVN r85174]
2013-07-30 07:57:02 +00:00
John Maddock
fd86f0cda7 Fix type of std::string::find_first_not_of to suppress warnings.
[SVN r85135]
2013-07-23 17:07:27 +00:00
John Maddock
9b7bf3303e Fix mpfi pow function to correctly handle negative base with integer power.
Fixed error handling to not return numeric_limits<>::quiet_NaN if there is no NaN supported.
Fixed default pow implementation to handle integer args up to numeric_limits<uintmax_t>::max().
Fixed error handling in default pow implementation to return NaN for too large exponents (can't tell if they're integers or even or odd) and negative bases.
Fixed array subscript bug in cpp_dec_float.
Greatly increased pow testing.
Fixes #8809.

[SVN r85008]
2013-07-12 16:13:34 +00:00
John Maddock
0bca8d4794 Change return type to reference to passed argument.
[SVN r84998]
2013-07-10 16:08:57 +00:00
John Maddock
714b02ccfe Fix bug in eval_pow that causes 0^N to be none-zero.
Fixes #8798.

[SVN r84997]
2013-07-10 16:08:12 +00:00
John Maddock
8b4c3e0f38 enable intrinsics for more compilers
[SVN r84975]
2013-07-07 16:49:36 +00:00
John Maddock
87fb76c1be Reorganise bit scanning code.
Add tests for msb function.

[SVN r84972]
2013-07-07 15:29:01 +00:00
John Maddock
cbf8fd9cc9 Correct output of small-integer types.
Fixes #8745.

[SVN r84928]
2013-07-01 18:14:14 +00:00
John Maddock
f2821a0231 Fix left shift operator.
Fixes #8741.

[SVN r84925]
2013-07-01 17:06:12 +00:00
John Maddock
573f35f5a9 Change to use std::string::size_type rather than unsigned.
Fixes #8748.

[SVN r84922]
2013-07-01 15:47:11 +00:00
John Maddock
73210bb222 Apply remaining fixes from #8732.
Also adds msb (most significant bit) function to multiprecision.
Fixes #8732.

[SVN r84921]
2013-07-01 15:43:28 +00:00
John Maddock
3b8f3a84ba Remove some unused typedefs: fixes some gcc-4.8 warnings
[SVN r84904]
2013-06-25 17:48:04 +00:00
John Maddock
22b76da209 Add missing #include
[SVN r84898]
2013-06-24 12:08:20 +00:00
John Maddock
2a5a4b60f8 Add some typecasts to ensure conversion from negative values proceeds correctly.
Fix masking of values during construction so overflow wraps around in unchecked fixed precision integers.
Add tests for above changes.
Refs #8711.

[SVN r84897]
2013-06-24 10:36:01 +00:00