summaryrefslogtreecommitdiff
path: root/gmpxx.h
Commit message (Collapse)AuthorAgeFilesLines
...
* Spacing cleanup.Torbjorn Granlund2011-11-211-1/+1
|
* Add swap functions to gmpxx.Marc Glisse2011-09-211-0/+10
|
* __builtin_constant_p optimizations to turn x+0 into x, x*4 into x<<2, etc, ↵Marc Glisse2011-08-211-168/+301
| | | | | | all done in the C++ layer. Also rewrote the addition of rational and integer which always did a mpq_set first.
* C++: automatically turn c=(a+b)/2 into c=a+b;c/=2, no need for a temporary.Marc Glisse2011-05-151-8/+8
|
* Remove an unneeded overload of <<Marc Glisse2011-05-151-9/+1
|
* Test stream input/output on mp*_class and not just mp*_t.Marc Glisse2011-05-101-3/+6
| | | | Simple optimization: c=-(a+b) becomes c=a+b;c=-c.
* mp_bitcnt_t for [lr]shift.Marc Glisse2011-05-081-12/+12
|
* More mp_bitcnt_t. Probably still some left.Marc Glisse2011-05-081-4/+4
|
* More mp_bitcnt_t missed.Marc Glisse2011-05-081-25/+25
|
* Small gmpxx simplifications and optimizations.Marc Glisse2011-05-071-98/+28
|
* Make some conversions between C++ types explicit.Marc Glisse2011-05-061-2/+11
|
* Dedup the comparison code.Marc Glisse2011-03-201-197/+3
|
* Fix __gmp_set_expr declaration.Marc Glisse2011-03-201-17/+0
|
* Inline mpz_set_*i where it is safeMarc Glisse2011-03-161-8/+27
|
* Make __GMPZ_ULI_LIMBS more preprocessor-friendly.Marc Glisse2011-03-151-1/+7
|
* Store small temporary mpq on the stack.Marc Glisse2011-03-151-56/+27
|
* Put temp mpz_t from double on stack everywhereMarc Glisse2011-03-121-101/+51
|
* Remove leftover #undefsMarc Glisse2011-03-121-6/+0
|
* Change all bit counts for bignums to use mp_bitcnt_t. Update documentation.Torbjorn Granlund2009-12-201-42/+42
|
* (__GMP_DBL_LIMBS): Use DBL_MAX_EXP instead ofTorbjorn Granlund2008-09-081-76/+73
| | | | | | | | | | | | | | | | | std::numeric_limits<double>::max_exponent for better portability. (__GMP_DBL_LIMBS): New #define. (__GMP_ULI_LIMBS): New #define. (__GMPXX_TMP_UI): New macro. (__GMPXX_TMP_SI): New macro. (__GMPXX_TMP_D): New macro. (struct __gmp_binary_and): Rewrite, using the new macros. (struct __gmp_binary_ior): Likewise. (struct __gmp_binary_xor): Likewise. Use __GMPZ_* instead of __GMPZZ_* for bitwise ops, remove __GMPZZ_*. Remove repeated #undefs. (__gmp_alloc_cstring): Declare freefunc as extern "C".
* * gmpxx.h (struct __gmp_binary_rshift): Use floor rounding, not truncation.tege2008-02-271-1/+1
|
* (__gmp_binary_and, __gmp_binary_ior, __gmp_binary_xor):tege2008-02-271-0/+54
| | | | Add variants with unsigned long int argument.
* Update license to version 3.tege2007-09-181-4/+2
|
* Remove ternary stuff, it is hardly an optimization and ittege2006-11-041-497/+0
| | | | writes to destination before reading all source operands.
* (__GMP_DEFINE_TERNARY_EXPR2): Remove for now.tege2006-04-081-1354/+6
| | | | | | | | | | (struct __gmp_ternary_addmul2): Likewise. (struct __gmp_ternary_submul2): Likewise. #include <cstring>. (struct __gmp_alloc_cstring): Prefix strlen with std::. Remove mpfr code.
* Update FSF's address.tege2006-02-151-2/+2
|
* * gmpxx.h (__gmp_binary_equal, __gmp_binary_not_equal,Kevin Ryde2003-12-091-462/+28
| | | | | | __gmp_binary_less, __gmp_binary_less_equal, __gmp_binary_greater, __gmp_binary_greater_equal, __gmp_cmp_function): Use mpfr_cmp_si and mpfr_cmp_d.
* * gmpxx.h (gmp_randclass gmp_randinit_lc_2exp_size constructor): ThrowKevin Ryde2003-10-181-1/+4
| | | | std::length_error if size is too big.
* * gmpxx.h (mpz_class, mpq_class, mpf_class, mpfr_class constructorsKevin Ryde2003-10-181-26/+154
| | | | | and operator= taking string or char*): Throw std::invalid_argument if string cannot be converted.
* * gmpxx.h [__MPFR_H]: Include full <iostream> for inlines.Kevin Ryde2003-08-171-0/+6
|
* * gmpxx.h: Correction to temp variable type in mpf -> mpfr assignment.Kevin Ryde2003-08-171-1/+1
| | | | Reported by Derrick Bass.
* (struct __gmp_hypot_function): Correction to mpfr_hypot addition.Kevin Ryde2003-08-171-4/+4
|
* * gmpxx.h: __gmp_default_rounding_mode -> __gmpfr_default_rounding_modeKevin Ryde2003-08-171-149/+149
|
* * gmpxx.h (struct __gmp_binary_multiplies): Use mpz_mul_si forKevin Ryde2003-07-241-18/+2
| | | | mpz*long and long*mpz.
* * gmpxx.h (struct __gmp_hypot_function): Use mpfr_hypot.Kevin Ryde2003-07-241-45/+19
|
* * gmpxx.h (mpz_class __gmp_binary_divides, __gmp_binary_modulus): FixKevin Ryde2003-06-221-7/+12
| | | | | long/mpz and long%mpz for dividend==LONG_MIN divisor==-LONG_MIN. (mpz_class __gmp_binary_modulus): Fix mpz%long for negative dividend.
* * gmpxx.h (get_d): Remove comments about long double, double isKevin Ryde2003-06-211-5/+4
| | | | correct for get_d, a future long double form would be get_ld.
* * gmpxx.h (struct __gmp_alloc_cstring): Use mp_get_memory_functions,Kevin Ryde2002-12-211-2/+7
| | | | not __gmp_free_func.
* * gmpxx.h (__gmp_randinit_lc_2exp_size_t): Return type is int.Kevin Ryde2002-11-191-1/+1
|
* 2002-11-14 Gerardo Ballabio <gerardo.ballabio@unimib.it>Kevin Ryde2002-11-131-3/+5
| | | | | | * gmpxx.h (__gmp_randinit_default_t, __gmp_randinit_lc_2exp_t, __gmp_randinit_lc_2exp_size_t): Use extern "C" { typedef ... }, for the benefit of g++ prior to 3.2.
* * gmpxx.h (gmp_randclass constructors): Patch from Roberto Bagnara toKevin Ryde2002-11-121-4/+7
| | | | use extern "C" on C function pointer arguments.
* 2002-09-26 Gerardo Ballabio <gerardo.ballabio@unimib.it>Kevin Ryde2002-09-261-2/+2
| | | | | * gmpxx.h (__gmp_cmp_function): Bug fixes in double/mpq and double/mpfr comparisons.
* 2002-09-24 Gerardo Ballabio <gerardo.ballabio@unimib.it>Kevin Ryde2002-09-241-3/+8
| | | | | * gmpxx.h (mpfr_class constructors from strings): Precision was set incorrectly, fixed.
* 2002-09-20 Gerardo Ballabio <gerardo.ballabio@unimib.it>Kevin Ryde2002-09-201-4/+4
| | | | | * gmpxx.h (__gmp_binary_equal, __gmp_binary_not_equal): Fix broken mpq/double functions.
* 2002-07-30 Gerardo Ballabio <gerardo.ballabio@unimib.it>Kevin Ryde2002-09-081-2020/+1338
| | | | | | | | * gmpxx.h (__gmpz_value etc): Remove, use mpz_t etc instead. (__gmp_expr): Reorganise specializations, use __gmp_expr<T,T> not mpz_class etc. (mpfr evals): Remove mode parameter, was always __gmp_default_rounding_mode anyway.
* 2002-07-30 Gerardo Ballabio <gerardo.ballabio@unimib.it>Kevin Ryde2002-07-301-1074/+2572
| | | | | * gmpxx.h: Use mpz_addmul etc for ternary a+b*c etc. Reorganise some macros for maintainability. Merge mpfrxx.h.
* * gmpxx.h (mpf_class::get_str): Make exponent mp_exp_t&, defaultKevin Ryde2002-06-221-2/+8
| | | | | | base=10 and ndigits=0. (mpz_class::set_str, mpq_class::set_str, mpf_class::set_str): Add versions accepting "const char *".
* 2002-06-20 Gerardo Ballabio <gerardo.ballabio@unimib.it>Kevin Ryde2002-06-201-423/+17
| | | | | | * gmpxx.h, mpfrxx.h: Remove mpz_classref, let mpq_class::get_num and mpq_class::get_den return mpz_class& as per the documentation. Reported by Roberto Bagnara.
* * gmpxx.h (struct __gmp_binary_minus): Use mpz_ui_sub.Kevin Ryde2002-05-081-7/+6
|
* 2002-04-17 Gerardo Ballabio <gerardo.ballabio@unimib.it>Kevin Ryde2002-04-171-86/+136
| | | | | | * gmpxx.h, mpfrxx.h: Remove mpfr_class bool combinations, remove mpfr_class::get_str2, use mp_rnd_t for rounding modes, use 8*sizeof(double) for mpfr_t's holding doubles.