summaryrefslogtreecommitdiff
path: root/exp2.c
Commit message (Collapse)AuthorAgeFilesLines
* 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/branches/2.3@5153 280ebfd0-de03-0410-8827-d642c229c3f4
* exp2.c: removed incorrect comment (merged changeset 5132 from thevlefevre2007-12-271-3/+1
| | | | | | | trunk). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/2.3@5133 280ebfd0-de03-0410-8827-d642c229c3f4
* Added mpfrlint script from the trunk and merged the feature-block branchvlefevre2007-12-261-2/+4
| | | | | | | | | | | | | | | | | | (corresponding to changeset 5115) to the 2.3 branch: * 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. [merge -c4865 .../trunk/sinh.c (reformatting -- to avoid a conflict) merge -c5115 .../trunk/ (feature-block)] git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/2.3@5128 280ebfd0-de03-0410-8827-d642c229c3f4
* Header inclusion clean-up (merged -r4631:4633 from the trunk).vlefevre2007-07-091-2/+0
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/2.3@4634 280ebfd0-de03-0410-8827-d642c229c3f4
* exp2.c: use MPFR_SMALL_INPUT_AFTER_SAVE_EXPO instead ofvlefevre2007-06-211-9/+6
| | | | | | | | | MPFR_FAST_COMPUTE_IF_SMALL_INPUT since 1 (__gmpfr_one) isn't necessarily representable. tests/texp2.c: added overflowed_exp2_0 test. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4565 280ebfd0-de03-0410-8827-d642c229c3f4
* MPFR_RET (mpfr_check_range (...)) -> return mpfr_check_range (...)vlefevre2007-05-281-2/+2
| | | | | | | | as mpfr_check_range already handles the inexact flag. Reformatting (removed trailing spaces, untabified). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4495 280ebfd0-de03-0410-8827-d642c229c3f4
* fixed direction of rounding for MPFR_FAST_COMPUTE_IF_SMALL_INPUTzimmerma2007-05-281-3/+5
| | | | | | | (was wrong for x < 0) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4486 280ebfd0-de03-0410-8827-d642c229c3f4
* added call to MPFR_FAST_COMPUTE_IF_SMALL_INPUT in exp2zimmerma2007-05-281-1/+8
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4484 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
* Added an assertion for mpfr_exp2 and a test.vlefevre2006-08-191-0/+2
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4129 280ebfd0-de03-0410-8827-d642c229c3f4
* In mpfr_exp2, the overflow flag was not set if mpfr_exp2 overflowedvlefevre2006-08-161-1/+3
| | | | | | | with x < emax. Added testcase. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4123 280ebfd0-de03-0410-8827-d642c229c3f4
* The latest mpfr_exp2 fix contained a bug. Partially rewrote mpfr_exp2vlefevre2006-08-151-18/+21
| | | | | | | | to fix this bug and another one (and added a corresponding testcase: exp2(10000000000.5), which was freezing). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4121 280ebfd0-de03-0410-8827-d642c229c3f4
* Better fix for exp2 exponent range bug.vlefevre2006-08-151-44/+40
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4119 280ebfd0-de03-0410-8827-d642c229c3f4
* Fixed bug in mpfr_exp2 when the argument is an integer and emin > 1.vlefevre2006-08-151-3/+8
| | | | | | | Added a testcase to texp2. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4117 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
* 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-13/+13
| | | | | | | 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-32/+32
| | | | 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 const_euler and eintzimmerma2005-05-041-7/+5
| | | | | | | | 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
* 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-21/+24
| | | | | | | Add ZivLoop git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3301 280ebfd0-de03-0410-8827-d642c229c3f4
* Rename internal functions mpfr_set_overflow in mpfr_overflow andpelissip2005-02-031-3/+3
| | | | | | | | 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
* Replace use of mpfr_save_emin_emax () / mpfr_restore_emin_emax()pelissip2004-11-181-6/+6
| | | | | | | | by MPFR_SAVE_EXPO macros (DECL, MARK and FREE) which are faster and thread safe. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3100 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
* Fix overflow and add corresponding tests.pelissip2004-05-061-91/+93
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2908 280ebfd0-de03-0410-8827-d642c229c3f4
* Optimize it a bit.pelissip2004-05-061-26/+15
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2906 280ebfd0-de03-0410-8827-d642c229c3f4
* improved test coveragezimmerma2004-02-121-8/+8
| | | | | | | replaced mpfr_get_d1 by mpfr_get_si git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2685 280ebfd0-de03-0410-8827-d642c229c3f4
* Add forgotten copyright 2004 line.pelissip2004-02-061-1/+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-11/+9
| | | | | | | | | | | | | | 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-24/+24
| | | | | | | | | 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-13/+16
| | | | | | | | 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-1/+1
| | | | | | | | | | | | 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
* mpfr_isinteger -> mpfr_integer_pzimmerma2003-02-131-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2240 280ebfd0-de03-0410-8827-d642c229c3f4
* fixed pb for underflow and rounding to nearestzimmerma2003-01-071-2/+9
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2141 280ebfd0-de03-0410-8827-d642c229c3f4
* Added assertions that can be resolved at compile time: the exponentsvlefevre2003-01-071-1/+4
| | | | | | | | must be representable in a long int (IMHO, this limitation should be avoided in a clean way). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2139 280ebfd0-de03-0410-8827-d642c229c3f4
* Bug fix: __mpfr_emax -> __gmpfr_emax.vlefevre2003-01-061-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2136 280ebfd0-de03-0410-8827-d642c229c3f4
* fixed infinite loop for 2^integerzimmerma2003-01-061-4/+17
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2134 280ebfd0-de03-0410-8827-d642c229c3f4
* Suppress some #define and fix symbol names (makes code cleaner):vlefevre2002-12-161-5/+5
| | | | | | | | | | | | | | | | | | | 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
* previous fix was completely wrongzimmerma2002-03-271-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1786 280ebfd0-de03-0410-8827-d642c229c3f4
* added check for underflowzimmerma2002-03-271-16/+22
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1784 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-16/+11
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1678 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