summaryrefslogtreecommitdiff
path: root/expm1.c
Commit message (Collapse)AuthorAgeFilesLines
* 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
* 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-4/+5
| | | | | | | | | | | | | | | * 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
* removed unused labelzimmerma2007-11-041-1/+0
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4946 280ebfd0-de03-0410-8827-d642c229c3f4
* <stdio.h> and <limits.h> are now included unconditionally in mpfr-impl.hvlefevre2007-07-091-2/+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
* Added MPFR_SMALL_INPUT_AFTER_SAVE_EXPO macro; updated expm1.c to usevlefevre2007-06-201-10/+6
| | | | | | | this variant (and moved MPFR_SAVE_EXPO_MARK after the test ex < 0). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4544 280ebfd0-de03-0410-8827-d642c229c3f4
* expm1.c: fixed bug for x = -max_value due to an intermediate overflowvlefevre2007-06-121-4/+10
| | | | | | | | (flags were incorrect); at the same time, potential problems due to a restricted exponent range are also fixed. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4539 280ebfd0-de03-0410-8827-d642c229c3f4
* Avoid integer overflow in MPFR_FAST_COMPUTE_IF_SMALL_INPUT.vlefevre2007-05-281-3/+3
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4468 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
* Optimized mpfr_expm1 for large (in absolute value) negative values invlefevre2006-08-161-2/+27
| | | | | | | | | order to avoid the TMD (the result is very close to -1). Without this patch, mpfr_expm1 could take dozens of MBs and the new generic tests for texpm1 could take several hours instead of less than 1 second. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4127 280ebfd0-de03-0410-8827-d642c229c3f4
* Fixed a bug in expm1 for very small negative arguments (and perhapsvlefevre2006-08-161-2/+11
| | | | | | | | | | | some very small positive arguments too); this bug is similar to the one in log1p that was recently found and fixed. It was detected by the new generic tests (not committed yet), therefore no testcases are provided. Note: the mpfr_expm1 function is still buggy (freezes on -0.10E18, prec 2 -> prec 13); this is a different bug. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4125 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
* replaced 6th empty argument of MPFR_FAST_COMPUTE_IF_SMALL_INPUT by {}zimmerma2006-03-161-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4038 280ebfd0-de03-0410-8827-d642c229c3f4
* Added ', Inc.' when missing after 'Free Software Foundation'.vlefevre2006-01-051-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3985 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-2/+2
| | | | | | | 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-22/+22
| | | | 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
* Fix bug of overflowpelissip2005-05-181-4/+25
| | | | | | | | Fix bug of wrong ternary value in case of overflow Add test cases. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3586 280ebfd0-de03-0410-8827-d642c229c3f4
* Add support for MPFR_FAST_COMPUTE_IS_SMALL_INPUTpelissip2005-05-131-0/+3
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3553 280ebfd0-de03-0410-8827-d642c229c3f4
* improved const_euler and eintzimmerma2005-05-041-1/+1
| | | | | | | | removed dependency from input precision in several functions fixed two bugs in pow (detection of exact cases) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3524 280ebfd0-de03-0410-8827-d642c229c3f4
* improved expm1/log1p for small argumentzimmerma2005-04-251-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3487 280ebfd0-de03-0410-8827-d642c229c3f4
* improved to taken account of case |x| small (reported by Keith Briggs)zimmerma2005-04-251-9/+12
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3486 280ebfd0-de03-0410-8827-d642c229c3f4
* Fix wrong comment.pelissip2005-04-131-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3437 280ebfd0-de03-0410-8827-d642c229c3f4
* Replace mpfr_can_round (..., GMP_RNDN, GMP_RNDZ, ...) to fast replacementpelissip2005-03-141-2/+1
| | | | | | | mpfr_round_p. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3388 280ebfd0-de03-0410-8827-d642c229c3f4
* Clean uppelissip2005-02-141-43/+42
| | | | | | | Add ZivLoop git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3301 280ebfd0-de03-0410-8827-d642c229c3f4
* Replace __gmpfr_ceil_log2 by MPFR_INT_CEIL_LOG2 when possible.pelissip2004-11-101-1/+2
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3076 280ebfd0-de03-0410-8827-d642c229c3f4
* improved test coveragezimmerma2004-02-121-3/+2
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2689 280ebfd0-de03-0410-8827-d642c229c3f4
* Add forgotten copyright 2004 line.pelissip2004-02-061-3/+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
* 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-4/+6
| | | | | | | | | | | | | | 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-27/+26
| | | | | | | | | 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
* replaced mpfr_can_round (approx, err, rnd1, GMP_RNDN, prec)zimmerma2003-10-141-4/+5
| | | | | | | | by mpfr_can_round (approx, err, rnd1, GMP_RNDZ, prec + 1) which in addition guarantees a correct inexact flag git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2492 280ebfd0-de03-0410-8827-d642c229c3f4
* Macros MPFR_EXP_INVALID (invalid exponent value) and MPFR_EXP_CHECKvlefevre2003-05-221-18/+20
| | | | | | | | | | | | added. Code update to use MPFR_GET_EXP and MPFR_SET_EXP instead of MPFR_EXP to allow more bug detection related to special values. Macros MPFR_SET_NAN, MPFR_SET_INF, MPFR_SET_ZERO and MPFR_INIT set the exponent of the number to MPFR_EXP_INVALID if MPFR_EXP_CHECK is defined. Compile with -DMPFR_EXP_CHECK and make check to see the potential problems; currently, 40 of 76 tests fail. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2301 280ebfd0-de03-0410-8827-d642c229c3f4
* Suppress some #define and fix symbol names (makes code cleaner):vlefevre2002-12-161-2/+2
| | | | | | | | | | | | | | | | | | | perl -pi -e 's/__mpfr_flags/__gmpfr_flags/g' **/*.{c,h} perl -pi -e 's/__mpfr_emin/__gmpfr_emin/g' **/*.{c,h} perl -pi -e 's/__mpfr_emax/__gmpfr_emax/g' **/*.{c,h} perl -pi -e 's/__mpfr_default_fp_bit_precision/__gmpfr_default_fp_bit_precision/g' **/*.{c,h} perl -pi -e 's/__gmp_default_rounding_mode/__gmpfr_default_rounding_mode/g' **/*.{c,h} perl -pi -e 's/__mpfr_const_log2_prec/__gmpfr_const_log2_prec/g' **/*.{c,h} perl -pi -e 's/__mpfr_const_pi_prec/__gmpfr_const_pi_prec/g' **/*.{c,h} perl -pi -e 's/_mpfr_ceil_log2/__gmpfr_ceil_log2/g' **/*.{c,h} perl -pi -e 's/_mpfr_floor_log2/__gmpfr_floor_log2/g' **/*.{c,h} perl -pi -e 's/_mpfr_ceil_exp2/__gmpfr_ceil_exp2/g' **/*.{c,h} perl -pi -e 's/_mpfr_isqrt/__gmpfr_isqrt/g' **/*.{c,h} perl -pi -e 's/_mpfr_cuberoot/__gmpfr_cuberoot/g' **/*.{c,h} perl -pi -e 's/^#define __gmpfr_.*\n//' *.h git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2125 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
* 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
* Misc bug fixes and code clean-up.vlefevre2002-02-011-13/+11
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1678 280ebfd0-de03-0410-8827-d642c229c3f4
* remove math.hdaney2001-11-161-3/+2
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1556 280ebfd0-de03-0410-8827-d642c229c3f4
* removed K&R function headerszimmerma2001-11-161-7/+0
| | | | 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
* translated french comments to englishzimmerma2001-11-161-2/+1
| | | | | | | removed prototype already in mpfr.h git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1510 280ebfd0-de03-0410-8827-d642c229c3f4
* clear tedaney2001-11-011-0/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1459 280ebfd0-de03-0410-8827-d642c229c3f4
* correct mp_prec_t err => long intdaney2001-10-261-2/+2
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1410 280ebfd0-de03-0410-8827-d642c229c3f4
* add the function expm1daney2001-10-171-0/+124
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1278 280ebfd0-de03-0410-8827-d642c229c3f4