summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* [src/mpfr.h] Added casts to improve robustness in case of undefinedvlefevre2010-09-011-23/+23
| | | | | | | | behavior and compiler extensions based on UB (in particular -fwrapv). MPFR doesn't use such extensions, but these macros will be used by 3rd-party code, where such extensions may be required. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@7121 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mpfr.h] Updated a comment concerning -Wconversion.vlefevre2010-09-011-1/+5
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@7120 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mpfr.h] Added casts to unsigned long in mpfr_cmp_si and mpfr_set_sivlefevre2010-09-011-17/+21
| | | | | | | | | | macros for GCC, in order to avoid warnings in programs that use MPFR and are compiled with -Wconversion (suggestion by Andreas Enge); such casts are OK since if X is a constant expression, then (unsigned long) X is also a constant expression, so that the optimizations still work. Reformatted these macros. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@7118 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mpfr.h] Fixed bug in the mpfr_cmp_ui macro for GCC (also usedvlefevre2010-09-011-2/+4
| | | | | | | | by mpfr_cmp_si), when the evaluation of the first argument yields side effects and the second argument is a constant expression with the value 0. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@7116 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mpfr.h] Added a comment about the macros that usevlefevre2010-09-011-0/+4
| | | | | | __builtin_constant_p. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@7113 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/gmp_op.c] Extend the exponent range in mpfr_cmp_q and mpfr_cmp_f.vlefevre2010-08-231-2/+11
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@7106 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/gmp_op.c] In mpfr_add_q / mpfr_sub_q, check with MPFR_ASSERTNvlefevre2010-08-231-2/+14
| | | | | | | | | that an internal overflow/underflow doesn't occur. In theory, such an exception is possible, but only if q has a huge numerator or denominator. This is not supported (note: other problems may occur first, such as insufficient memory). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@7105 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/gmp_op.c] Extend the exponent range in mpfr_add_q / mpfr_sub_qvlefevre2010-08-231-2/+12
| | | | | | | (overflow/underflow exceptions are not supported yet). [tests/tgmpop.c] Added corresponding testcases. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@7102 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/gmp_op.c] Fixed the Inf +/- Inf cases for mpfr_add_q / mpfr_sub_q.vlefevre2010-08-191-2/+14
| | | | | | [tests/tgmpop.c] Added Inf +/- Inf tests. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@7101 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/gmp_op.c] The function mpfr_cmp_z could fail in a reducedvlefevre2010-08-191-1/+21
| | | | | | | exponent range. [tests/tgmpop.c] Added a corresponding testcase. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@7099 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/gmp_op.c] The functions mpfr_mul_z, mpfr_div_z, mpfr_add_z andvlefevre2010-08-191-4/+13
| | | | | | | mpfr_sub_z could fail in a reduced exponent range. Fixed. [tests/tgmpop.c] Added corresponding testcase. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@7098 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/gmp_op.c] Fixed the intermediate overflow case in mpfr_muldiv_zvlefevre2010-08-181-12/+34
| | | | | | (for mpfr_mul_q and mpfr_div_q). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@7096 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/gmp_op.c] Added function mpfr_muldiv_z (currently static -- shouldvlefevre2010-08-181-42/+47
| | | | | | | | | it be in the API?) that computes y = RND(x*n/d), where n and d are mpz integers. Changed mpfr_mul_q and mpfr_div_q to use this function. Note: the code of the general case is currently the same as the old mpfr_mul_q/mpfr_div_q code, thus needs to be fixed. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@7095 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/logging.c] Added a comment about register_printf_function.vlefevre2010-08-171-1/+5
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@7092 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/Makefile.am] Fixed -version-info (I forgot to increment CURRENT).vlefevre2010-08-171-2/+2
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@7088 280ebfd0-de03-0410-8827-d642c229c3f4
* Source reorganization. In short:vlefevre2010-08-17230-0/+45127
* Added directories and moved related files into them: - src for the MPFR source files (to build the library). - doc for documentation files (except INSTALL, README...). - tools for various tools (scripts) and mbench. - tune for tuneup-related source files. - other for other source files (not distributed in tarballs). Existing directories: - tests for the source files of the test suite (make check). - examples for examples. - m4 for m4 files. * Renamed configure.in to configure.ac. * Added/updated Makefile.am files where needed. * Updated acinclude.m4 and configure.ac (AC_CONFIG_FILES line). * Updated the documentation (INSTALL, README, doc/README.dev and doc/mpfr.texi). * Updated NEWS and TODO. * Updated the scripts now in tools. The following script was used: #!/usr/bin/env zsh svn mkdir doc other src tools tune svn mv ${${(M)$(sed -n '/libmpfr_la_SOURCES/,/[^\]$/p' \ Makefile.am):#*.[ch]}:#get_patches.c} mparam_h.in \ round_raw_generic.c jyn_asympt.c src svn mv mbench check_inits_clears coverage get_patches.sh mpfrlint \ nightly-test update-patchv update-version tools svn mv bidimensional_sample.c speed.c tuneup.c tune svn mv *.{c,h} other svn mv FAQ.html README.dev algorithm* faq.xsl fdl.texi mpfr.texi \ update-faq doc svn mv configure.in configure.ac svn cp Makefile.am src/Makefile.am svn rm replace_all [Modifying some files, see above] svn add doc/Makefile.am svn add tune/Makefile.am git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@7087 280ebfd0-de03-0410-8827-d642c229c3f4