summaryrefslogtreecommitdiff
path: root/src/fpif.c
Commit message (Collapse)AuthorAgeFilesLines
* [src,tests] Consistency: in prototypes, changedvlefevre2020-08-211-6/+7
| | | | | | | | | const mpfr_t to mpfr_srcptr mpfr_t to mpfr_ptr (except for mpfr_t *), as this is equivalent (the array is converted to a pointer) and the mpfr_srcptr/mpfr_ptr form is the usual one. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@14103 280ebfd0-de03-0410-8827-d642c229c3f4
* Copyright notice update: added 2020 withvlefevre2020-01-081-1/+1
| | | | | | | | perl -pi -e 's/ (\d{4}-)?(2019)(?= Free Software)/ " ".($1||"$2-").($2+1)/e' **/*(^/) under zsh. Removed 2019 from the example in the doc/README.dev file. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13652 280ebfd0-de03-0410-8827-d642c229c3f4
* Updated the www.gnu.org URL's (http → https) on all the files with:vlefevre2019-01-071-1/+1
| | | | | | | perl -pi -e 's,http://www.gnu.org/,https://www.gnu.org/,g' **/*(.) under zsh. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13372 280ebfd0-de03-0410-8827-d642c229c3f4
* Copyright notice update: added 2019 withvlefevre2019-01-011-1/+1
| | | | | | | | perl -pi -e 's/ (\d{4}-)?(2018)(?= Free Software)/ " ".($1||"$2-").($2+1)/e' **/*(^/) under zsh. Removed 2018 from the example in the doc/README.dev file. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13359 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/fpif.c] Reverted another incorrect change done in r12509.vlefevre2018-03-291-1/+5
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@12511 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/fpif.c] Reverted an incorrect change done in r12509.vlefevre2018-03-291-1/+5
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@12510 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/fpif.c] simplify code and improve coverage to 100%zimmerma2018-03-291-37/+9
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@12509 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/fpif.c] removed dead code and simplify codezimmerma2018-03-291-15/+7
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@12508 280ebfd0-de03-0410-8827-d642c229c3f4
* [tests/tfpif.c] improve coveragezimmerma2018-03-291-1/+2
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@12506 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/fpif.c]vlefevre2018-03-281-3/+10
| | | | | | | | | * Replaced an incorrect comment from r12500 by a correct assertion. * Fixed a theoretical bug coming from this incorrect comment. * Added a MPFR_ASSERTN assertion to double-check correctness. * Added a comment explaining a ... >= 0x80 test. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@12501 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/fpif.c] removed dead codezimmerma2018-03-281-4/+7
| | | | | | | [tests/tfpif.c] improve coverage git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@12500 280ebfd0-de03-0410-8827-d642c229c3f4
* Fixed spelling mistakes found by codespell 1.12.0.vlefevre2018-03-091-2/+2
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@12474 280ebfd0-de03-0410-8827-d642c229c3f4
* Copyright notice update: added 2018 withvlefevre2018-01-031-1/+1
| | | | | | | | | | perl -pi -e 's/ (\d{4}-)?(2017)(?= Free Software)/ " ".($1||"$2-").($2+1)/e' **/*(^/) under zsh, reverting the ck-mparam and timings-mpfr.c files and the mbench directory under "tools" (not distributed with MPFR). Removed 2017 from the example in the doc/README.dev file. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@12067 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/fpif.c] Removed FIXME about the sign bit of NaN: done invlefevre2017-12-071-6/+2
| | | | | | r11910 and r11920 (documentation + tests). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11929 280ebfd0-de03-0410-8827-d642c229c3f4
* Simplified the use of MPFR_USE_FILE since <stdio.h> (<cstdio> for C++)vlefevre2017-12-041-1/+0
| | | | | | is unconditionally included. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11893 280ebfd0-de03-0410-8827-d642c229c3f4
* make compilation work again (make + make check) with mini-gmpzimmerma2017-12-041-0/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11891 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/fpif.c] Clarification.vlefevre2017-12-041-8/+10
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11889 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/fpif.c] Updated comments about the format.vlefevre2017-12-011-2/+5
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11874 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/fpif.c] Fixed the sign bug for mpfr_fpif_import.vlefevre2017-11-291-13/+13
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11861 280ebfd0-de03-0410-8827-d642c229c3f4
* [doc/mpfr.texi,src/fpif.c] For mpfr_fpif_import, in case of failure,vlefevre2017-11-291-5/+11
| | | | | | | the argument x is either unchanged or set to NaN, to make sure that x has valid contents (otherwise this could yield erratic behavior). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11858 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/fpif.c] For mpfr_fpif_import, replaced an assertion by a failurevlefevre2017-11-291-3/+3
| | | | | | | (since the full format is not described in the manual and MPFR cannot currently generate such a case, this is OK). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11857 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/fpif.c] Fixed some bugs (though unlikely to occur in practice).vlefevre2017-11-281-25/+43
| | | | | | Added comments. Minor code improvement. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11853 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/fpif.c] Added static assertions in mpfr_fpif_import().vlefevre2017-11-281-0/+7
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11851 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/fpif.c] Improved a test (mpfr_regular_p → !MPFR_IS_SINGULAR).vlefevre2017-11-281-1/+3
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11850 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/fpif.c] Added format description from past mail messages, to bevlefevre2017-11-271-2/+41
| | | | | | checked in case of change (+ FIXME for NaN). Minor code improvement. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11848 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/fpif.c] Clarified sign variable.vlefevre2017-11-271-1/+4
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11846 280ebfd0-de03-0410-8827-d642c229c3f4
* Cleanup: In src/mpfr-gmp.h, exchangedvlefevre2017-11-101-10/+10
| | | | | | | | | | mpfr_allocate_func and *__gmp_allocate_func mpfr_reallocate_func and *__gmp_reallocate_func mpfr_free_func and *__gmp_free_func and in the code, replaced *__gmp_{allocate,reallocate,free}_func by mpfr_{allocate,reallocate,free}_func; updated TODO file. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11820 280ebfd0-de03-0410-8827-d642c229c3f4
* Copyright notice update: added 2017 withvlefevre2017-01-011-1/+1
| | | | | | | | | perl -pi -e 's/ (\d{4}-)?(2016)(?= Free Software)/ " ".($1||"$2-").($2+1)/e' **/*(^/) under zsh, reverting the tools/mbench directory (not distributed with MPFR). Removed 2016 from the example in the doc/README.dev file. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11117 280ebfd0-de03-0410-8827-d642c229c3f4
* Added MPFR_EXP_IN_RANGE macro, and replaced some tests to use it.vlefevre2016-05-181-2/+2
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10296 280ebfd0-de03-0410-8827-d642c229c3f4
* Copyright notice update: added 2016 withvlefevre2016-01-011-1/+1
| | | | | | | | | perl -pi -e 's/ (\d{4}-)?(2015)(?= Free Software)/ " ".($1||"$2-").($2+1)/e' **/*(^/) under zsh (the m4 and tools/mbench directories were not modified). Removed 2015 from the example in the doc/README.dev file. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9779 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/fpif.c] Added an assertion (I get a build failure with gcc-snapshotvlefevre2015-07-311-1/+4
| | | | | | | 20150722-1 due to -Werror=array-bounds, but the code looks OK). Simplified test on: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67077 git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9638 280ebfd0-de03-0410-8827-d642c229c3f4
* Copyright notice update: added 2015 withvlefevre2015-02-131-1/+1
| | | | | | | | | perl -pi -e 's/ (\d{4}-)?(2014)(?= Free Software)/ " ".($1||"$2-").($2+1)/e' **/*(^/) under zsh, reverting the tools/mbench directory (not distributed with MPFR). Removed 2014 from the example in the doc/README.dev file. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9278 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/fpif.c] Bug fixes and code clean-up. At the same time, took thevlefevre2014-02-121-66/+57
| | | | | | future mpfr_set_exp change into account (see set_exp branch). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8949 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/fpif.c] English usage.vlefevre2014-02-121-6/+6
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8947 280ebfd0-de03-0410-8827-d642c229c3f4
* [src] Replaced some MPFR_ASSERTN's by MPFR_STAT_STATIC_ASSERT (from thevlefevre2014-01-241-1/+1
| | | | | | | | | | detection by mpfrlint). Note: the MPFR_ASSERTN's concerning relations between the MPFR exponent type and the long type have not been replaced because these tests may fail with the non-standard _MPFR_EXP_FORMAT = 4 on some platforms (e.g. 32-bit ones), and we still want to be able to build MPFR in this case in order to test it; this needs to be fixed. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8896 280ebfd0-de03-0410-8827-d642c229c3f4
* Copyright notice update: added 2014 withvlefevre2014-01-031-1/+1
| | | | | | | | | perl -pi -e 's/ (\d{4}-)?(2013)(?= Free Software)/ " ".($1||"$2-").($2+1)/e' **/*(^/) under zsh (the tools/mbench directory was not modified). Removed 2013 from the example in the doc/README.dev file. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8723 280ebfd0-de03-0410-8827-d642c229c3f4
* Use copyright year ranges, followingvlefevre2013-05-301-1/+1
| | | | | | http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8540 280ebfd0-de03-0410-8827-d642c229c3f4
* Copyright notice update: added 2013 withvlefevre2013-01-031-1/+1
| | | | | | | | | perl -pi -e 's/2012 Free Software/2012, 2013 Free Software/' **/*(^/) under zsh, reverting the ChangeLog file and the m4 directory (the tools/mbench directory was not modified). Removed 2012 from the example in the doc/README.dev file. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8447 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/fpif.c] Added an assert on MPFR_PREC_MIN because the code seemsvlefevre2012-12-211-0/+1
| | | | | | to be based on this (always true with the current value). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8442 280ebfd0-de03-0410-8827-d642c229c3f4
* mpfr_fpif_import now check precision size. Documentation updated for ↵demengeo2012-12-211-6/+5
| | | | | | mpfr_fpif_import. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8440 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/fpif.c] Added a FIXME comment in mpfr_fpif_import concerning thevlefevre2012-12-121-1/+6
| | | | | | precision. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8437 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/fpif.c] Added comments. Fixed mpfr_fpif_read_precision_from_filevlefevre2012-12-111-19/+32
| | | | | | | in the case where the precision size > sizeof(mpfr_prec_t) and/or when the read precision is too large (as mpfr_prec_t is signed). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8436 280ebfd0-de03-0410-8827-d642c229c3f4
* [fpif.c] completed FIXMEzimmerma2012-12-111-1/+2
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8435 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/fpif.c] Added a FIXME comment: large precisions read from the filevlefevre2012-12-081-0/+3
| | | | | | can trigger undefined behavior if sizeof(mpfr_prec_t) is too small. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8434 280ebfd0-de03-0410-8827-d642c229c3f4
* Fixed stack overflow bug in fpif.cdemengeo2012-12-071-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8433 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/fpif.c] No longer assume that if HAVE_BIG_ENDIAN is not defined,vlefevre2012-07-271-8/+12
| | | | | | | | | | | | the architecture is little endian. Detect the case where neither HAVE_BIG_ENDIAN nor HAVE_LITTLE_ENDIAN is defined (currently an error). [configure.ac] Fixed the use of AC_C_BIGENDIAN (since AC_CONFIG_HEADERS is not used, one must have an ACTION-IF-UNIVERSAL argument). [doc/README.dev] Check with "-UHAVE_BIG_ENDIAN -UHAVE_LITTLE_ENDIAN" (unknown/unspecified endianness) before a release. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8367 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/fpif.c,tests/tfpif.c] changed to GNU stylezimmerma2012-03-261-2/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8132 280ebfd0-de03-0410-8827-d642c229c3f4
* Add a test on FILE* in fpif.c; Added a missing test on a return value; ↵demengeo2012-03-261-2/+17
| | | | | | Changed the way to compute number of bytes needed for the limb of a mpfr number; Increase coverage test of fpif.c git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8131 280ebfd0-de03-0410-8827-d642c229c3f4
* MPFR_ASSERTD or MPFR_ASSERTN must be used for assertions, not ASSERT.vlefevre2012-03-261-4/+4
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8123 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/fpif.c] simplified &x[i] into x+izimmerma2012-03-201-12/+18
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8119 280ebfd0-de03-0410-8827-d642c229c3f4