summaryrefslogtreecommitdiff
path: root/mul.c
Commit message (Collapse)AuthorAgeFilesLines
* Partial fix: The inexact flag was not always set in some functions.vlefevre2006-08-201-2/+2
| | | | | | | | | In particular, it is now set by mpfr_check_range (if t is not zero) since mpfr_check_range usually comes just after MPFR_SAVE_EXPO_FREE (which restores the previous flags). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4131 280ebfd0-de03-0410-8827-d642c229c3f4
* Removed the #ifndef __hpux from mul.c (after a test on a HP-UX machine,vlefevre2006-04-181-3/+0
| | | | | | | I got no failures, even with the old mpfr-longlong.h). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4072 280ebfd0-de03-0410-8827-d642c229c3f4
* Fixed FSF address.vlefevre2006-03-311-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4055 280ebfd0-de03-0410-8827-d642c229c3f4
* Updated the copyright notices according to the new GNU rules on:vlefevre2006-01-051-2/+1
| | | | | | | | | | | http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices i.e. added 2006 to every MPFR file. Note: the copyright notices (currently 336) should match the regexp Copyright.* 2006 Free Software so that it will be easier to update them for the next year... git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3983 280ebfd0-de03-0410-8827-d642c229c3f4
* Temporary optimization (patch from Patrick Pelissier).vlefevre2005-10-071-1/+3
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3883 280ebfd0-de03-0410-8827-d642c229c3f4
* Reverted to previous mparam_h.in and mul.c, and applied Patrick'svlefevre2005-09-111-3/+3
| | | | | | | patch instead. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3834 280ebfd0-de03-0410-8827-d642c229c3f4
* MUL_THRESHOLD -> MUL_THRESHOLD+1 (to allow MUL_THRESHOLD=0, needed forzimmerma2005-09-081-3/+3
| | | | | | | tuneup.c) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3812 280ebfd0-de03-0410-8827-d642c229c3f4
* Fixed memory leak (missing MPFR_TMP_FREE in a particular case).vlefevre2005-08-311-1/+6
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3761 280ebfd0-de03-0410-8827-d642c229c3f4
* Unobfuscated 2 assertions.vlefevre2005-08-301-2/+2
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3744 280ebfd0-de03-0410-8827-d642c229c3f4
* Fixed indentation and some comments.vlefevre2005-08-301-80/+81
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3743 280ebfd0-de03-0410-8827-d642c229c3f4
* Recommitted the patch (without discarding previous modifications).vlefevre2005-08-301-16/+51
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3742 280ebfd0-de03-0410-8827-d642c229c3f4
* Reverted to the previous version, as the patch discarded previousvlefevre2005-08-301-49/+17
| | | | | | | modifications. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3741 280ebfd0-de03-0410-8827-d642c229c3f4
* patch from Patrick to solve efficiency problem when one operand is sparsezimmerma2005-08-301-17/+49
| | | | | | | (e.g. from ui_pow_ui) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3739 280ebfd0-de03-0410-8827-d642c229c3f4
* When WANT_ASSERT >= 2: the corresponding messages are now outputvlefevre2005-08-241-9/+13
| | | | | | | to stderr instead of stdout. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3737 280ebfd0-de03-0410-8827-d642c229c3f4
* Removed trailing spaces (better for future patches, as such spacesvlefevre2005-08-181-18/+18
| | | | | | | are sometimes stripped). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3726 280ebfd0-de03-0410-8827-d642c229c3f4
* Converted tabs to spaces with expand.vlefevre2005-08-181-176/+176
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3725 280ebfd0-de03-0410-8827-d642c229c3f4
* Clean up use of stdio.h:pelissip2005-06-081-1/+0
| | | | | | | | it is now included by mpfr-impl iff DEBUG is defined or WANT_ASSERT is defined. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3631 280ebfd0-de03-0410-8827-d642c229c3f4
* Change the address of the FSF.pelissip2005-06-021-2/+2
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3606 280ebfd0-de03-0410-8827-d642c229c3f4
* Replace TMP_ALLOC by MPFR_TMP_ALLOCpelissip2005-05-181-11/+11
| | | | | | | | | | Replace TMP_DECL by MPFR_TMP_DECL Replace TMP_MARK by MPFR_TMP_MARK Replace TMP_FREE by MPFR_TMP_FREE Add support for GMP's TMP_SALLOC. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3593 280ebfd0-de03-0410-8827-d642c229c3f4
* Fix bug due to wrong assertion.pelissip2005-05-111-1/+3
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3537 280ebfd0-de03-0410-8827-d642c229c3f4
* Fix a bug in the product of 2limbs per 2 limbs.pelissip2005-05-101-12/+13
| | | | | | | Add new regression test. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3534 280ebfd0-de03-0410-8827-d642c229c3f4
* Undo previous change (I was wrong).pelissip2005-03-251-4/+2
| | | | | | | Add new regression test. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3406 280ebfd0-de03-0410-8827-d642c229c3f4
* Fix wrong extimated precision.pelissip2005-03-241-2/+4
| | | | | | | It is log2(n+2) ulps so that log2(log2(n+2)) bits! git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3405 280ebfd0-de03-0410-8827-d642c229c3f4
* Don't use Mulder at n+1 for MPFR_MUL_THRESHOLD+1pelissip2005-03-231-1/+2
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3401 280ebfd0-de03-0410-8827-d642c229c3f4
* Fix bug on HP-UX.pelissip2005-03-221-20/+5
| | | | | | | | longlong's umul_ppmm seems to be buggy on such a system. Don't use it under HP-UX. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3398 280ebfd0-de03-0410-8827-d642c229c3f4
* Add case where bn == 1 and bn == 2 by using longlong.h.pelissip2005-03-211-4/+41
| | | | | | | | | Modify tuneup to start with prec=2*BITS_PER_MP_LIMB+1 Fix bug in computing the estimated precision when you switch from N limbs to N+1 limbs. Add regression tests. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3396 280ebfd0-de03-0410-8827-d642c229c3f4
* Replace mpfr_can_round (..., GMP_RNDN, GMP_RNDZ, ...) to fast replacementpelissip2005-03-141-4/+2
| | | | | | | mpfr_round_p. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3388 280ebfd0-de03-0410-8827-d642c229c3f4
* Fix bug: tmp may have changed in mulhigh code.pelissip2005-03-101-2/+5
| | | | | | | Restore it before calling mpn_mul. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3384 280ebfd0-de03-0410-8827-d642c229c3f4
* Handle case where Prec(a) ~ estimated prec of mulhigh.pelissip2005-03-091-10/+53
| | | | | | | Add one extra limb, and still uses mulhigh. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3381 280ebfd0-de03-0410-8827-d642c229c3f4
* Add assertion.pelissip2005-03-091-0/+2
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3377 280ebfd0-de03-0410-8827-d642c229c3f4
* Improve checkingpelissip2005-03-091-6/+6
| | | | | | | Add test. Short Mulder product failed for this. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3376 280ebfd0-de03-0410-8827-d642c229c3f4
* Improve full assertion mode (Check mpfr_mul).pelissip2005-03-091-1/+177
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3375 280ebfd0-de03-0410-8827-d642c229c3f4
* Add log info.pelissip2005-03-081-0/+5
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3372 280ebfd0-de03-0410-8827-d642c229c3f4
* Add Mulder Short product for mpfr_mul.pelissip2005-03-081-1/+64
| | | | | | | Update algorithm.tex to describe the estimated error. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3370 280ebfd0-de03-0410-8827-d642c229c3f4
* Spelling mistakes & reformatted code.vlefevre2005-02-161-12/+12
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3324 280ebfd0-de03-0410-8827-d642c229c3f4
* Rename internal functions mpfr_set_overflow in mpfr_overflow andpelissip2005-02-031-5/+6
| | | | | | | | mpfr_set_underflow in mpfr_underflow so that we can add new functions mpfr_set_underflow and mpfr_set_overflow (which set the global flags). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3269 280ebfd0-de03-0410-8827-d642c229c3f4
* Optimize mpfr_mul by inlining and rewriting the rounding.pelissip2004-12-081-73/+61
| | | | | | | | It seems that GCC option `-frename-registers` for mpfr_mul / Athlon XP improves its performance (But it decreases it on Pentium4)... git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3120 280ebfd0-de03-0410-8827-d642c229c3f4
* changed rights (remove executable permission)zimmerma2004-10-191-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3039 280ebfd0-de03-0410-8827-d642c229c3f4
* Optimize a few mpfr_mul.pelissip2004-02-261-20/+19
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2818 280ebfd0-de03-0410-8827-d642c229c3f4
* Add a comment.pelissip2004-02-231-3/+3
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2780 280ebfd0-de03-0410-8827-d642c229c3f4
* Reduce the number of used variables.pelissip2004-02-171-16/+16
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2759 280ebfd0-de03-0410-8827-d642c229c3f4
* added comment about probability of normalized productzimmerma2004-02-171-0/+3
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2747 280ebfd0-de03-0410-8827-d642c229c3f4
* Remove MPFR_ASSERTN(0) and add MPFR_ASSERTD(last condition) instead.pelissip2004-02-121-3/+2
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2696 280ebfd0-de03-0410-8827-d642c229c3f4
* Add forgotten copyright 2004 line.pelissip2004-02-061-2/+1
| | | | | | | Add a small documentation about mpfr_sum. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2671 280ebfd0-de03-0410-8827-d642c229c3f4
* + Better support of non IEEE doubles.pelissip2004-02-061-3/+1
| | | | | | | + You can compile MPFR without gmp internal files (ie gmp-impl.h, gmp-mparam.h, and config.h). You only need gmp.h and libgmp.a. But you can still compile with GMP internal files (configure detects them). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2665 280ebfd0-de03-0410-8827-d642c229c3f4
* + Add function mpfr_print_mantissa_binary, for debugging reason.pelissip2003-12-091-3/+3
| | | | | | | | | | | | + Rename MPFR_ALLOC_SIZE in MPFR_MALLOC_SIZE. + Add conditionnal -DSMALL directive in mpfr-impl.h. + Add new function: sub1sp. Substraction in case of all the ops have the same prec. + Add its test (tsub1sp). + Modify a few the tests to avoid comparing mpfr results with double, for portability reason. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2569 280ebfd0-de03-0410-8827-d642c229c3f4
* Remove some warnings and potential errors (Comparaison between signed and ↵pelissip2003-11-211-1/+1
| | | | | | unsigned). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2563 280ebfd0-de03-0410-8827-d642c229c3f4
* Optimization of mpfr_mul.pelissip2003-11-191-18/+16
| | | | | | | | Tiny optimization of mpfr_pow (The case y=0 has been put inside the MPFR_ARE_SINGULAR block). Tiny optimisation of mpfr_set_ui. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2554 280ebfd0-de03-0410-8827-d642c229c3f4
* * Optimize a few div.c and mul.c.pelissip2003-11-171-5/+6
| | | | | | | | | | | | | * Reorder the tests. * Remove mpfr_round_raw_generic and create 4 new functions which replace it, for efficiency reasons. * Add round_raw_generic.c which is the generic file to create the 4 new functions. * Add new MACRO: MPFR_RNDUTEST_OR_RNDDNOTTEST which is a faster way to check if (rnd_mode==GMP_RNDU && test) || (rnd_mode==GMP_RNDD && !test). * Add new MACRO: MPFR_UNSIGNED_MINUS_MODULO. * Optimize mpfr_can_round_raw. * Some new defines in mpfr.h to increase compatibility with MPFR v2.0.1 and above. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2550 280ebfd0-de03-0410-8827-d642c229c3f4
* Some minor optimizations.pelissip2003-11-071-9/+16
| | | | | | | | Optimization of mul.c / sub1.c. Some clean up in the header files. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2537 280ebfd0-de03-0410-8827-d642c229c3f4