| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
mini-gmp and mp_limb_t < long (e.g. "-DMINI_GMP_LIMB_TYPE=short").
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13953 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13952 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
| |
in order to support mini-gmp with -DMINI_GMP_LIMB_TYPE=...
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13951 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
|
|
|
|
| |
use of uint64_t in src/get_ld.c, while <stdint.h> was not included:
replaced it by "unsigned long long", which does not need a specific
header (an exact 64-bit type is not needed, we just need at least a
64-bit width, which unsigned long long is guaranteed to have).
Note: unsigned long long may not be available with a pre-C99 compiler,
but this is not worse than uint64_t. This limitation is currently OK
as GMP_NUMB_BITS == 8 support is just for testing.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13950 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MPFR_CHECK_MP_LIMB_T_VS_INTMAX similar:
* Use AC_LINK_IFELSE in MPFR_CHECK_MP_LIMB_T_VS_LONG too: this
is safer than AC_COMPILE_IFELSE, as it will detect undefined
function-like macros.
* Define MPFR_USE_STATIC_ASSERT in MPFR_CHECK_MP_LIMB_T_VS_INTMAX
too in order to make sure that a static assertion is used (not
the MPFR_ASSERTN fallback).
Note: These constitute redundant safeguards because if MPFR_ASSERTN
is used, it will be regarded as a function since the macro is not
defined in this context, and linking will fail as a consequence.
But this redundancy will protect more against MPFR code evolution.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13949 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MPFR_USE_STATIC_ASSERT to 1 before including mpfr-sassert.h, i.e.
by requiring static assertions: because AC_COMPILE_IFELSE is used
(i.e. just compiling, no linking), the test could incorrectly succeed
when MPFR_USE_STATIC_ASSERT was not defined, i.e. whatever the value
of "(mp_limb_t) -1 >= (unsigned long) -1"; indeed, in this case,
MPFR_ASSERTN() was used instead of a static assertion, and since the
macro was not defined here, MPFR_ASSERTN was regarded as a function
(without a prototype), which was fine for compiling (except when the
compiler is configured to regard warnings such as missing prototype
as errors). In short, one could get "yes" while long was larger than
mp_limb_t.
Note: In uncommon cases (non-standard compiler...), one can still get
"no" while a long fits in mp_limb_t, but this isn't much an issue as
the MPFR code should work in such a case. Moreover, src/mpfr-impl.h
will also have the chance to set MPFR_LONG_WITHIN_LIMB in practice.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13948 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
useless, and it had drawbacks. Details:
* In src/mpfr-sassert.h, the default definition of this macro in the
MPFR_USE_STATIC_ASSERT case ended with a spurious ";". Since this
macro was unused, this wasn't noticeable... except in the configure
test for static assertions, which failed in some cases (e.g. with
CFLAGS="-std=c99 -pedantic-errors -Wno-error=overlength-strings")
for this reason, which had the effect to let MPFR_USE_STATIC_ASSERT
undefined, while static assertions were actually working.
* Still in src/mpfr-sassert.h, but when MPFR_USE_STATIC_ASSERT is not
defined, the MPFR_DECL_STATIC_ASSERT(c) expanded to nothing, which
would yield invalid code as
MPFR_DECL_STATIC_ASSERT(some_assertion);
would yield an extra ";" (about the same issue as above). Given
the fact that the portable MPFR_USE_STATIC_ASSERT code does not
work with this compiler, it is not clear whether this is fixable
in a completely reliable way.
* MPFR_DECL_STATIC_ASSERT can be replaced by MPFR_STAT_STATIC_ASSERT
after moving it to the statement section of a function, with almost
no drawbacks (just a bit readability in some cases?).
* When MPFR_USE_STATIC_ASSERT is not defined, MPFR_STAT_STATIC_ASSERT
will check the assertion at run time (for free, since the result is
known at compile time), while MPFR_DECL_STATIC_ASSERT would not be
able to do anything useful.
Changes:
* acinclude.m4: removed the test of MPFR_DECL_STATIC_ASSERT.
* src/mpfr-sassert.h: removed MPFR_DECL_STATIC_ASSERT definitions.
* tune/tuneup.c: removed MPFR_DECL_STATIC_ASSERT redefinition.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13947 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
| |
that using MPFR_ASSERTN (as the code tries to do if static assertions
are not supported, but currently fails) would be incorrect.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13946 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
| |
intmax_t is defined (assuming that it is iff uintmax_t is defined).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13945 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
| |
"long within limb" and "intmax_t within limb".
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13944 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13942 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13941 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
| |
exit status.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13940 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
| |
needs to take the printf length modifier in argument.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13939 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
resolving the FIXME. The issue was that it used an AC_RUN_IFELSE,
so that the format could not be determined when cross-compiling.
The code to determine the format of long double did not have such
an issue: the object file was analyzed by an awk script. Since a
long double can have the same format as a double, this code was
already able to recognize a double, in particular. So the change
consisted in slightly adapting this code to accept the tested type
as an argument ("double" or "long double", the mpfr_cv_… variable
name being obtained thanks to AS_VAR_PUSHDEF) and reusing it for
the detection of the format of double.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13938 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
| |
* Removed an unused AH_VERBATIM.
* Removed "not available" condition, no longer possible since r13936.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13937 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
|
|
| |
the availability of long double. This code was useless since it was
just outputting "not available" if long double was missing, and one
would get an error later since MPFR requires long double. But since
long double is in ISO C89, it is useless to add a test just to return
an error for pre-C89 compilers.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13936 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
| |
purpose is to define a HAVE_LONG_DOUBLE macro.
[configure.ac] Removed HAVE_LONG_DOUBLE from the cleanup: no longer
needed with the change in acinclude.m4.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13935 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13934 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* acinclude.m4: removed the detection of memmove, memset and strtol,
which was not used (a macro "HAVE_..." was defined... to be removed
in configure.ac!); for AC_CHECK_FUNCS, remove options starting with
"-Werror" as they can yield a spurious failure due to the way this
test is done (this occurred on memmove and memset with GCC due to
builtins, and similar issues could still occur in practice with the
remaining functions in the AC_CHECK_FUNCS list).
* configure.ac: removed HAVE_STRTOL from the macro cleanup: no longer
needed since strtol has been removed from the AC_CHECK_FUNCS list.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13933 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
| |
the exit status values 1..3 to 81..83 in order to avoid confusion, as
low values can typically be returned in case of compile or link error.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13932 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13931 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
| |
included directly; MPFR_NEED_LONGLONG_H must be defined instead.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13930 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
| |
MPFR_NEED_INTMAX_H here when mpfr-intmax.h is used.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13929 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
| |
is not included directly; MPFR_NEED_INTMAX_H must be defined instead.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13928 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a new macro MPFR_NEED_INTMAX_H, which should be defined instead of
using: #include "mpfr-intmax.h"
Details on the bugs fixed:
* The code added in r13916 forgot a #include <limits.h> since this
code does a test on ULLONG_MAX. With the cleanup, <limits.h> is
already always included by mpfr-impl.h (early enough).
* In src/get_str.c and tests/memory.c, a #include "config.h" was
missing before #include "mpfr-intmax.h"; this issue would affect
platforms where "config.h" is needed and where <inttypes.h> or
<stdint.h> does not exist or does not work.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13923 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
| |
also needs to temporarily increase the memory limit, thus require
MPFR_CHECK_LARGEMEM too.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13922 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
| |
the check of the bit-field ordering for _Decimal128.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13920 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
| |
a compiler error with exit status 1 was mixed up with little endian.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13919 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
| |
with native /usr/bin/cc, which knows the long long type but defines
ULONGLONG_MAX, etc. instead of ULLONG_MAX, etc.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13916 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
| |
pre-C99 compilers (and this change was useless).
If C99 syntax is needed, there should be a configure test, and the
code should be conditional.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13915 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13914 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13913 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13912 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
| |
(avoid failures for n <= 10000)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13911 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13910 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
| |
wrong in the error analysis of mpfr_bernoulli_internal()
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13909 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
| |
[tests/tgamma.c] use MPFR_CHECK_EXPENSIVE
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13908 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13907 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13906 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
| |
radices β are actually not concerned since in such radices, β^k
is always odd, so that the exponent does not matter.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13898 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
|
|
|
| |
about the even-rounding rule in particular cases: 1-digit precision
and odd radices.
Note: A short explanation was already in the mpfr_get_str description,
which is where the issue could occur at the time the minimum precision
of MPFR numbers was 2. Now that the minimum precision is 1, this rule
in such special cases is more general.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13897 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13896 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
| |
to the more common "{less,greater} than or equal to".
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13895 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
| |
to Section "Rounding".
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13893 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
| |
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13892 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
| |
* Added a note about the sign of the result (important for 0).
* Described the directed rounding modes (BTW, this notion of
"directed rounding modes" was used but never defined).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13891 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
|
| |
* Be more clear that MPFR_RNDN uses the even rounding rule.
* In "two representable numbers", add "consecutive".
* Be more general than radix 2 (due to conversions to a string).
* Consistent typography.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13890 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
|
|
| |
* mpfr_init2: mention mpfr_prec_round; added a note about
memory allocation.
* mpfr_prec_round: clarification ("new allocation" could be
surprising since one needs less memory).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13889 280ebfd0-de03-0410-8827-d642c229c3f4
|
|
|
|
|
|
|
| |
in case the allocated memory is enough
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13888 280ebfd0-de03-0410-8827-d642c229c3f4
|