summaryrefslogtreecommitdiff
path: root/fma.c
Commit message (Collapse)AuthorAgeFilesLines
* Copyright notice update: added 2009 withvlefevre2009-01-151-1/+1
| | | | | | | perl -pi -e 's/2008 Free Software/2008, 2009 Free Software/' **/*(^/) under zsh. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@5814 280ebfd0-de03-0410-8827-d642c229c3f4
* r5689 undone: some casts were incorrect (mp_exp_t may be greater thanvlefevre2008-11-221-3/+2
| | | | | | | | | mp_prec_t, so that casting a mp_exp_t into a mp_prec_t can introduce a bug). There may be bugs in some cases, but the casts fix the symptom, not the bug (unless one casts the unsigned type to a signed type that is *strictly* larger, which is not possible here). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@5690 280ebfd0-de03-0410-8827-d642c229c3f4
* fixed some signed/unsigned warnings with g++ (please review)zimmerma2008-11-221-2/+3
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@5689 280ebfd0-de03-0410-8827-d642c229c3f4
* This is now GNU MPFR!vlefevre2008-10-271-4/+4
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@5654 280ebfd0-de03-0410-8827-d642c229c3f4
* fma.c, fms.c: added a comment about apparently incorrect scaling.vlefevre2008-07-311-0/+3
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@5468 280ebfd0-de03-0410-8827-d642c229c3f4
* For the terminating null pointer of the functions mpfr_inits,vlefevre2008-02-151-1/+1
| | | | | | | | | | | | | | | | mpfr_inits2, mpfr_clears, always use the type mpfr_ptr (no longer void *). Updated the description of these functions in the manual (mpfr.texi). The reason is that the C standard does not guarantee that (void *) 0 has the same representation as a null pointer to a structure (and even the same size). In most C implementations, the representations are the same, but one never knows (dynamical checking is also always possible)... The change has been done with: perl -pi -e \ 's/(mpfr_(clear|init)s.*)\(void *\*\) *0\)/$1(mpfr_ptr) 0)/' **/*.c under zsh. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@5290 280ebfd0-de03-0410-8827-d642c229c3f4
* Copyright notice update: added 2008 withvlefevre2008-01-011-1/+1
| | | | | | | | perl -pi -e 's/2007 Free Software/2007, 2008 Free Software/' **/*(^/) under zsh. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@5151 280ebfd0-de03-0410-8827-d642c229c3f4
* Merged the feature-block branch to the trunk:vlefevre2007-12-181-35/+42
| | | | | | | | | | | | | | | * New MPFR_BLOCK* macros (see mpfr-impl.h) and mpfrlint check to test exception flags in a more reliable way and detect possible problems with mpfrlint. * Improved the generic tests (tests/tgeneric.c): for the second function call, sometimes set all the flags since risk of failures are known when some flags are already set. * Modified code to use these new MPFR_BLOCK* macros. This fixed bugs related to exceptions (where flags are set before the call); in particular, tcot and ty1 failed with the improved generic tests. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@5115 280ebfd0-de03-0410-8827-d642c229c3f4
* <stdio.h> and <limits.h> are now included unconditionally in mpfr-impl.hvlefevre2007-07-091-1/+0
| | | | | | | (removed their inclusion from the C files for consistency). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4632 280ebfd0-de03-0410-8827-d642c229c3f4
* fma.c: minor changes for consistency with the future fms.vlefevre2007-07-011-4/+2
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4598 280ebfd0-de03-0410-8827-d642c229c3f4
* Completed the implementation of mpfr_fma (except in some corner casesvlefevre2007-07-011-15/+73
| | | | | | | | | where overflows/underflows and huge precisions are involved at the same time). Added underflow tests. Removed item from the BUGS file (the remaining problems more or less correspond to the first item). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4597 280ebfd0-de03-0410-8827-d642c229c3f4
* fma.c: implemented the main cases where x * y underflows.vlefevre2007-07-011-2/+22
| | | | | | | tests/tfma.c: fixed overflow tests and added underflow tests. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4594 280ebfd0-de03-0410-8827-d642c229c3f4
* fma.c: completed the cases where x*y/4 needs to be used, except the veryvlefevre2007-06-291-34/+38
| | | | | | | particular cases where an underflow occurs, that remain to be done. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4591 280ebfd0-de03-0410-8827-d642c229c3f4
* fma.c: added an assertion.vlefevre2007-06-291-0/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4589 280ebfd0-de03-0410-8827-d642c229c3f4
* fma.c: updated a comment.vlefevre2007-06-291-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4586 280ebfd0-de03-0410-8827-d642c229c3f4
* fixed typozimmerma2007-05-231-2/+3
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4464 280ebfd0-de03-0410-8827-d642c229c3f4
* fma.c: improved comments and simplified the code.vlefevre2007-05-221-24/+21
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4457 280ebfd0-de03-0410-8827-d642c229c3f4
* fma.c: implemented exponent range expansion and the main part when thevlefevre2007-05-221-6/+101
| | | | | | | | | multiplication overflows. The following remains to do: * when the multiplication overflows: some corner cases; * when the multiplication underflows: everything. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4456 280ebfd0-de03-0410-8827-d642c229c3f4
* Added "Contributed by the Arenaire and Cacao projects, INRIA." to thevlefevre2007-02-071-0/+1
| | | | | | | copyright notices and removed a few old things. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4350 280ebfd0-de03-0410-8827-d642c229c3f4
* Copyright notice update: added 2007.vlefevre2007-01-101-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4326 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-1/+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
* Removed trailing spaces (better for future patches, as such spacesvlefevre2005-08-181-1/+1
| | | | | | | 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-50/+50
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3725 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
* improved coverage testzimmerma2004-02-121-4/+6
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2691 280ebfd0-de03-0410-8827-d642c229c3f4
* Add forgotten copyright 2004 line.pelissip2004-02-061-5/+2
| | | | | | | 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
* Fix some bugs (Use MPFR_ASSERT(1) instead of MPFR_ASSERT(0))pelissip2003-11-051-1/+1
| | | | | | | Optimize swap.c and copysign.c. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2536 280ebfd0-de03-0410-8827-d642c229c3f4
* + Remove MPFR_CLEAR_NAN and MPFR_CLEAR_INF. Only use MPFR_CLEAR_FLAGS.pelissip2003-11-041-13/+12
| | | | | | | | | | | | | | MPFR_SET_INF, MPFR_SET_ZERO and MPFR_SET_ZERO must clear the flags before setting them. + Add a new test in tacosh.c : check Inf / Nan flags. + Use MPFR_IS_SINGULAR in all the remaining files. + Fix the use of MPFR_CLEAR_FLAGS. + mpfr-impl.h auto include gmp.h, gmp-impl.h, mpfr.h and limits.h. + Rename _PROTO to _MPFR_PROTO, and remove _GMP_PROTO. + Add MPFR_INT_SIGN macro. + Encapsulate a few more the sign. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2529 280ebfd0-de03-0410-8827-d642c229c3f4
* Use of MPFR_UNLIKELY and MPFR_IS_SINGULAR for fast detection of special ↵pelissip2003-10-281-65/+61
| | | | | | | | | values (Nan, Inf or Zero). Start to encapsulate the sign to be independant of the reprensation (Must be 1 or -1). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2525 280ebfd0-de03-0410-8827-d642c229c3f4
* COPYING -> COPYING.LIB and GPL re-added.vlefevre2002-04-151-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1877 280ebfd0-de03-0410-8827-d642c229c3f4
* COPYING.LIB -> COPYING.vlefevre2002-04-051-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1820 280ebfd0-de03-0410-8827-d642c229c3f4
* put back simple algorithm that computes x*y exactly and thenzimmerma2002-03-261-92/+8
| | | | | | | directly calls mpfr_add, to avoid wrong inexact flags git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1780 280ebfd0-de03-0410-8827-d642c229c3f4
* Some changes in the types.vlefevre2002-03-171-3/+3
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1747 280ebfd0-de03-0410-8827-d642c229c3f4
* changed Nt variable to signedzimmerma2002-03-171-2/+2
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1746 280ebfd0-de03-0410-8827-d642c229c3f4
* Copyright line changed.vlefevre2002-03-041-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1713 280ebfd0-de03-0410-8827-d642c229c3f4
* Code clean-up (goto suppressed).vlefevre2002-01-181-53/+41
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1661 280ebfd0-de03-0410-8827-d642c229c3f4
* Cases 0 * 0 + 0.vlefevre2002-01-181-1/+19
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1660 280ebfd0-de03-0410-8827-d642c229c3f4
* Nt: int -> mp_prec_tvlefevre2002-01-181-5/+5
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1659 280ebfd0-de03-0410-8827-d642c229c3f4
* <> changed back to "".vlefevre2002-01-181-4/+4
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1658 280ebfd0-de03-0410-8827-d642c229c3f4
* Change indendation + replace "" -> <> in headerdaney2002-01-181-90/+91
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1656 280ebfd0-de03-0410-8827-d642c229c3f4
* Particular cases rewritten.vlefevre2002-01-171-58/+59
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1655 280ebfd0-de03-0410-8827-d642c229c3f4
* Unused variables.vlefevre2001-11-301-2/+2
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1607 280ebfd0-de03-0410-8827-d642c229c3f4
* fixed detection of exact cases (in particular 0)zimmerma2001-11-301-9/+6
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1603 280ebfd0-de03-0410-8827-d642c229c3f4
* removed K&R function headerszimmerma2001-11-161-10/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1548 280ebfd0-de03-0410-8827-d642c229c3f4
* changed Library GPL to Lesser GPLzimmerma2001-11-161-4/+4
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1536 280ebfd0-de03-0410-8827-d642c229c3f4
* mixed version beetwen DD and Pau => (gestion des flag inexacte dirige)daney2001-10-261-1/+92
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1432 280ebfd0-de03-0410-8827-d642c229c3f4
* nouvelew version (without loop)zimmerma2001-10-251-62/+13
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1384 280ebfd0-de03-0410-8827-d642c229c3f4
* new versiondaney2001-10-251-4/+11
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1365 280ebfd0-de03-0410-8827-d642c229c3f4