summaryrefslogtreecommitdiff
path: root/exp.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/trunk@5151 280ebfd0-de03-0410-8827-d642c229c3f4
* fixed underflow problem in mpfr_exp_3zimmerma2007-11-301-4/+7
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@5066 280ebfd0-de03-0410-8827-d642c229c3f4
* removed manual change to __gmpfr_emin outside the allowed rangezimmerma2007-11-301-1/+0
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@5062 280ebfd0-de03-0410-8827-d642c229c3f4
* Updated copyright notice (for an unknown reason, some files were missingvlefevre2007-08-291-1/+1
| | | | | | | from the change done in r4350). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4800 280ebfd0-de03-0410-8827-d642c229c3f4
* exp.c: fixed problems in reduced exponent range.vlefevre2007-06-211-9/+15
| | | | | | | tests/texp.c: added overflowed_exp0 test. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4564 280ebfd0-de03-0410-8827-d642c229c3f4
* exp.c bug fix: a rounding mode was incorrect.vlefevre2007-06-211-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4563 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
* Partial fix: The inexact flag was not always set in some functions.vlefevre2006-08-201-1/+1
| | | | | | | | | 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
* 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
* fixed bug in exp(-eps) for rounding toward zero (test was also wrong...)zimmerma2005-09-131-1/+2
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3844 280ebfd0-de03-0410-8827-d642c229c3f4
* Removed trailing spaces (better for future patches, as such spacesvlefevre2005-08-181-3/+3
| | | | | | | 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-30/+30
| | | | 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 when exp(x) is near the limit of an overflow or anpelissip2005-05-111-0/+2
| | | | | | | | | underflow (mpfr_exp_2 didn't allow an overflow/underflow in its internal loop). Add corresponding test case. exp_3 may need similar patchs. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3539 280ebfd0-de03-0410-8827-d642c229c3f4
* Log input and ouput of functions.pelissip2005-02-151-2/+3
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3315 280ebfd0-de03-0410-8827-d642c229c3f4
* Add log for other functions.pelissip2005-02-101-26/+38
| | | | | | | | Add ZivLoop too. Cleanup exp3. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3290 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
* Fixed a sign bug in mpfr_exp (found by Mark J Watkins).vlefevre2005-01-291-3/+3
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3246 280ebfd0-de03-0410-8827-d642c229c3f4
* Fix wrong integer type and a test.pelissip2004-12-201-2/+4
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3158 280ebfd0-de03-0410-8827-d642c229c3f4
* Replace use of mpfr_save_emin_emax () / mpfr_restore_emin_emax()pelissip2004-11-181-6/+8
| | | | | | | | 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
* Fix overflow problems.pelissip2004-05-061-4/+7
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2905 280ebfd0-de03-0410-8827-d642c229c3f4
* Add some UNLIKELY to the tests.pelissip2004-05-041-3/+3
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2888 280ebfd0-de03-0410-8827-d642c229c3f4
* Change from MP_LIMB_T_ONE to MPFR_LIMB_ONE and/or MPFR_LIMB_MASK.pelissip2004-03-261-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2858 280ebfd0-de03-0410-8827-d642c229c3f4
* Rename mpfr_exp3 in mpfr_exp_3.pelissip2004-03-171-2/+2
| | | | | | | | Update THRESHOLD for mpfr_exp. Add MPFR_EXP_THRESHOLD. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2848 280ebfd0-de03-0410-8827-d642c229c3f4
* fixed tiny bugs for corner caseszimmerma2004-02-121-5/+11
| | | | | | | improved test coverage git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2687 280ebfd0-de03-0410-8827-d642c229c3f4
* Add forgotten copyright 2004 line.pelissip2004-02-061-1/+0
| | | | | | | 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
* Changed some error messages into assertions.vlefevre2004-01-141-4/+3
| | | | | | | Removed some useless #include's. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2622 280ebfd0-de03-0410-8827-d642c229c3f4
* Fix some bugs (Use MPFR_ASSERT(1) instead of MPFR_ASSERT(0))pelissip2003-11-051-0/+2
| | | | | | | 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-15/+8
| | | | | | | | | | | | | | 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-21/+20
| | | | | | | | | 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
* Fixed mpfr_set_overflow, added tests for mpfr_set_underflowvlefevre2003-09-141-2/+1
| | | | | | | and mpfr_set_overflow, and reverted exp.c. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2411 280ebfd0-de03-0410-8827-d642c229c3f4
* overflow with round to zero was incorrectzimmerma2003-09-131-1/+2
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2410 280ebfd0-de03-0410-8827-d642c229c3f4
* improved error analysis on erfzimmerma2003-06-131-2/+2
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2332 280ebfd0-de03-0410-8827-d642c229c3f4
* Macros MPFR_EXP_INVALID (invalid exponent value) and MPFR_EXP_CHECKvlefevre2003-05-221-2/+2
| | | | | | | | | | | | 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-6/+6
| | | | | | | | | | | | | | | | | | | 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
* Prototype of mpfr_setmax and mpfr_setmin changed (exponent given).vlefevre2002-07-261-10/+17
| | | | | | | | | In mpfr_exp for x ~= 0, add_one_ulp and sub_one_ulp are no longer used (sub_one_ulp was incorrect). These cases should now be faster. Small fix in mpfr_nextabove, mpfr_nextbelow and mpfr_nexttoward. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2002 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
* Code clean-up.vlefevre2002-04-121-3/+0
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1865 280ebfd0-de03-0410-8827-d642c229c3f4
* mpfr_get_d -> mpfr_get_d1 and mpfr_get_d2 -> mpfr_get_d.vlefevre2002-04-071-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1825 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-041-12/+2
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1681 280ebfd0-de03-0410-8827-d642c229c3f4
* Misc bug fixes and code clean-up.vlefevre2002-02-011-15/+9
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1678 280ebfd0-de03-0410-8827-d642c229c3f4
* mpfr_add_one_ulp and mpfr_sub_one_ulp changed.vlefevre2001-11-211-2/+2
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1570 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
* implement ternary inexact flagzimmerma2001-10-151-31/+69
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1256 280ebfd0-de03-0410-8827-d642c229c3f4